From 4088852ce0a838eb4b6a0a1c2b2636c8622b39ab Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 25 Aug 2022 21:30:11 -0400 Subject: [PATCH] Add vessel prompt fact --- NewHorizons/External/Configs/StarSystemConfig.cs | 11 ++++++++--- NewHorizons/Handlers/VesselCoordinatePromptHandler.cs | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/NewHorizons/External/Configs/StarSystemConfig.cs b/NewHorizons/External/Configs/StarSystemConfig.cs index afc84992..5f5dd66b 100644 --- a/NewHorizons/External/Configs/StarSystemConfig.cs +++ b/NewHorizons/External/Configs/StarSystemConfig.cs @@ -15,7 +15,7 @@ namespace NewHorizons.External.Configs public class StarSystemConfig { /// - /// Whether this system can be warped to via the warp drive + /// Whether this system can be warped to via the warp drive. If you set factRequiredForWarp, this will be overwritten. /// [DefaultValue(true)] public bool canEnterViaWarpDrive = true; @@ -30,8 +30,8 @@ namespace NewHorizons.External.Configs [DefaultValue(true)] public bool enableTimeLoop = true; /// - /// Set to the FactID that must be revealed before it can be warped to. Don't set `CanEnterViaWarpDrive` to `false` if - /// you're using this, that would make no sense. + /// Set to the FactID that must be revealed before it can be warped to. Don't set `canEnterViaWarpDrive` to `false` if + /// you're using this, because it will be overwritten. /// public string factRequiredForWarp; @@ -189,6 +189,11 @@ namespace NewHorizons.External.Configs /// Euler angles by which the warp exit will be oriented. /// public MVector3 warpExitRotation; + + /// + /// A ship log fact which will make a prompt appear showing the coordinates when you're in the Vessel. + /// + public string promptFact; } /// diff --git a/NewHorizons/Handlers/VesselCoordinatePromptHandler.cs b/NewHorizons/Handlers/VesselCoordinatePromptHandler.cs index 636de907..f3578bda 100644 --- a/NewHorizons/Handlers/VesselCoordinatePromptHandler.cs +++ b/NewHorizons/Handlers/VesselCoordinatePromptHandler.cs @@ -31,7 +31,7 @@ namespace NewHorizons.Handlers foreach (var system in systems) { var systemName = system.UniqueID; - var fact = system.Config.factRequiredForWarp; + var fact = system.Config.Vessel.promptFact; var nomaiCoords = system.Config.Vessel?.coords; if (system.UniqueID == "EyeOfTheUniverse" || nomaiCoords == null) continue;