diff --git a/NewHorizons/Handlers/StarChartHandler.cs b/NewHorizons/Handlers/StarChartHandler.cs index 3e4c53dd..e0ed3585 100644 --- a/NewHorizons/Handlers/StarChartHandler.cs +++ b/NewHorizons/Handlers/StarChartHandler.cs @@ -59,6 +59,8 @@ namespace NewHorizons.Handlers _starSystemToFactID = new Dictionary(); _factIDToStarSystem = new Dictionary(); + _factRequiredToExitViaWarpDrive = string.Empty; + foreach (NewHorizonsSystem system in _systems) { if (system.Config.factRequiredForWarp != default && system.UniqueID != "SolarSystem") @@ -112,8 +114,8 @@ namespace NewHorizons.Handlers return ShipLogHandler.KnowsFact(factID); } - public static bool CanExitViaWarpDrive() => _canExitViaWarpDrive - && (string.IsNullOrEmpty(_factRequiredToExitViaWarpDrive) || ShipLogHandler.KnowsFact(_factRequiredToExitViaWarpDrive)); + public static bool CanExitViaWarpDrive() => Main.Instance.CurrentStarSystem == "SolarSystem" || (_canExitViaWarpDrive + && (string.IsNullOrEmpty(_factRequiredToExitViaWarpDrive) || ShipLogHandler.KnowsFact(_factRequiredToExitViaWarpDrive))); /// /// Is it actually a valid warp target