From dc1a0b08327872d3aaa46fd89edad47a3a573d9c Mon Sep 17 00:00:00 2001 From: xen-42 Date: Thu, 3 Oct 2024 00:52:02 -0400 Subject: [PATCH] Dont explode --- NewHorizons/Main.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index 14e67eb0..4217f0ee 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -909,8 +909,15 @@ namespace NewHorizons { if (!SystemDict.ContainsKey(config.starSystem)) { - NHLogger.LogError($"System config for {config.starSystem} does not exist?"); - return null; + var starSystemConfig = new StarSystemConfig() { name = config.starSystem }; + starSystemConfig.Migrate(); + starSystemConfig.FixCoordinates(); + + var system = new NewHorizonsSystem(config.starSystem, starSystemConfig, $"", mod); + + SystemDict.Add(config.starSystem, system); + + BodyDict.Add(config.starSystem, new List()); } // Has to happen after we make sure theres a system config