From 98cf27b0031c235494e0fe2798c49602eb566d43 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Tue, 15 Nov 2022 22:25:31 -0500 Subject: [PATCH 1/7] Add reveal for option to enter reveal volumes --- NewHorizons/Builder/ShipLog/RevealBuilder.cs | 16 ++++++++++++++++ NewHorizons/External/Modules/VolumesModule.cs | 15 +++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/NewHorizons/Builder/ShipLog/RevealBuilder.cs b/NewHorizons/Builder/ShipLog/RevealBuilder.cs index 3bfcdd69..fabe46cd 100644 --- a/NewHorizons/Builder/ShipLog/RevealBuilder.cs +++ b/NewHorizons/Builder/ShipLog/RevealBuilder.cs @@ -76,6 +76,22 @@ 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: + 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..3d923cc2 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 needs to be enter the volume to unlock the facts (`enter` only) + /// + [DefaultValue("both")] public EnterType revealFor = EnterType.Both; + /// /// A list of facts to reveal /// From f2cad5d04424ae71df97044f36d002072dc1b7a1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 16 Nov 2022 03:27:41 +0000 Subject: [PATCH 2/7] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 53171b59..9a7440f1 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 needs to be 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, From 45dbb97bf5a41ff73dddba5a3fa8da700b40c989 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Tue, 15 Nov 2022 22:29:17 -0500 Subject: [PATCH 3/7] i don't know english --- NewHorizons/External/Modules/VolumesModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/External/Modules/VolumesModule.cs b/NewHorizons/External/Modules/VolumesModule.cs index 3d923cc2..aab55e45 100644 --- a/NewHorizons/External/Modules/VolumesModule.cs +++ b/NewHorizons/External/Modules/VolumesModule.cs @@ -135,7 +135,7 @@ namespace NewHorizons.External.Modules [DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter; /// - /// What needs to be enter the volume to unlock the facts (`enter` only) + /// What needs to enter the volume to unlock the facts (`enter` only) /// [DefaultValue("both")] public EnterType revealFor = EnterType.Both; From 7249124f67f1088a138d54ec2e9efb476fc4f5ed Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Tue, 15 Nov 2022 22:31:11 -0500 Subject: [PATCH 4/7] comment --- NewHorizons/Builder/ShipLog/RevealBuilder.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NewHorizons/Builder/ShipLog/RevealBuilder.cs b/NewHorizons/Builder/ShipLog/RevealBuilder.cs index fabe46cd..f2d122c1 100644 --- a/NewHorizons/Builder/ShipLog/RevealBuilder.cs +++ b/NewHorizons/Builder/ShipLog/RevealBuilder.cs @@ -88,6 +88,7 @@ namespace NewHorizons.Builder.ShipLog 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; From 00c9024c0bd63852b9ffdf176869abaf8e3afcb2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 16 Nov 2022 03:33:17 +0000 Subject: [PATCH 5/7] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 9a7440f1..1716b0ad 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -2839,7 +2839,7 @@ "$ref": "#/definitions/RevealVolumeType" }, "revealFor": { - "description": "What needs to be enter the volume to unlock the facts (`enter` only)", + "description": "What needs to enter the volume to unlock the facts (`enter` only)", "default": "both", "$ref": "#/definitions/EnterType" }, From 45dd45f06956d6b1710ec5cb1fb6731b83ad9a68 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Tue, 15 Nov 2022 22:37:22 -0500 Subject: [PATCH 6/7] can --- NewHorizons/External/Modules/VolumesModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/External/Modules/VolumesModule.cs b/NewHorizons/External/Modules/VolumesModule.cs index aab55e45..34986d58 100644 --- a/NewHorizons/External/Modules/VolumesModule.cs +++ b/NewHorizons/External/Modules/VolumesModule.cs @@ -135,7 +135,7 @@ namespace NewHorizons.External.Modules [DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter; /// - /// What needs to enter the volume to unlock the facts (`enter` only) + /// What can enter the volume to unlock the facts (`enter` only) /// [DefaultValue("both")] public EnterType revealFor = EnterType.Both; From 8e1fac139ebf3033943b0e14d3925e7e33cf1312 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 16 Nov 2022 03:39:21 +0000 Subject: [PATCH 7/7] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 1716b0ad..485150b4 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -2839,7 +2839,7 @@ "$ref": "#/definitions/RevealVolumeType" }, "revealFor": { - "description": "What needs to enter the volume to unlock the facts (`enter` only)", + "description": "What can enter the volume to unlock the facts (`enter` only)", "default": "both", "$ref": "#/definitions/EnterType" },