diff --git a/NewHorizons/Builder/ShipLog/RevealBuilder.cs b/NewHorizons/Builder/ShipLog/RevealBuilder.cs index 3bfcdd69..f2d122c1 100644 --- a/NewHorizons/Builder/ShipLog/RevealBuilder.cs +++ b/NewHorizons/Builder/ShipLog/RevealBuilder.cs @@ -76,6 +76,23 @@ namespace NewHorizons.Builder.ShipLog { var factRevealVolume = go.AddComponent(); factRevealVolume._factIDs = info.reveals; + switch (info.revealFor) + { + case VolumesModule.RevealVolumeInfo.EnterType.Player: + factRevealVolume._player = true; + factRevealVolume._probe = false; + break; + case VolumesModule.RevealVolumeInfo.EnterType.Probe: + factRevealVolume._player = false; + factRevealVolume._probe = true; + break; + case VolumesModule.RevealVolumeInfo.EnterType.Both: + default: + // if you want both player and probe to able to trigger the thing you have to set both player and probe to false. setting both to true will make nothing trigger it + factRevealVolume._player = false; + factRevealVolume._probe = false; + break; + } } if (!string.IsNullOrEmpty(info.achievementID)) diff --git a/NewHorizons/External/Modules/VolumesModule.cs b/NewHorizons/External/Modules/VolumesModule.cs index 5791dd9a..34986d58 100644 --- a/NewHorizons/External/Modules/VolumesModule.cs +++ b/NewHorizons/External/Modules/VolumesModule.cs @@ -109,6 +109,16 @@ namespace NewHorizons.External.Modules [EnumMember(Value = @"snapshot")] Snapshot = 2 } + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterType + { + [EnumMember(Value = @"both")] Both = 0, + + [EnumMember(Value = @"player")] Player = 1, + + [EnumMember(Value = @"probe")] Probe = 2 + } + /// /// The max view angle (in degrees) the player can see the volume with to unlock the fact (`observe` only) /// @@ -124,6 +134,11 @@ namespace NewHorizons.External.Modules /// [DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter; + /// + /// What can enter the volume to unlock the facts (`enter` only) + /// + [DefaultValue("both")] public EnterType revealFor = EnterType.Both; + /// /// A list of facts to reveal /// diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 53171b59..485150b4 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -2838,6 +2838,11 @@ "default": "enter", "$ref": "#/definitions/RevealVolumeType" }, + "revealFor": { + "description": "What can enter the volume to unlock the facts (`enter` only)", + "default": "both", + "$ref": "#/definitions/EnterType" + }, "reveals": { "type": "array", "description": "A list of facts to reveal", @@ -2865,6 +2870,20 @@ "snapshot" ] }, + "EnterType": { + "type": "string", + "description": "", + "x-enumNames": [ + "Both", + "Player", + "Probe" + ], + "enum": [ + "both", + "player", + "probe" + ] + }, "PriorityVolumeInfo": { "type": "object", "additionalProperties": false,