diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index fd560863..dd54e53d 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -370,7 +370,11 @@ namespace NewHorizons if (starSystemConfig.startHere) { // We always want to allow mods to overwrite setting the main SolarSystem as default but not the other way around - if (name != "SolarSystem") SetDefaultSystem(name); + if (name != "SolarSystem") + { + SetDefaultSystem(name); + _currentStarSystem = name; + } } if (SystemDict.ContainsKey(name)) @@ -494,7 +498,6 @@ namespace NewHorizons public void SetDefaultSystem(string defaultSystem) { _defaultStarSystem = defaultSystem; - _currentStarSystem = defaultSystem; } #endregion Load diff --git a/NewHorizons/NewHorizonsApi.cs b/NewHorizons/NewHorizonsApi.cs index 260d32e6..135579ac 100644 --- a/NewHorizons/NewHorizonsApi.cs +++ b/NewHorizons/NewHorizonsApi.cs @@ -1,4 +1,4 @@ -using NewHorizons.Builder.Props; +using NewHorizons.Builder.Props; using NewHorizons.Utility; using OWML.Common; using OWML.Utils; @@ -77,6 +77,14 @@ namespace NewHorizons return Main.Instance.OnStarSystemLoaded; } + public bool SetDefaultSystem(string name) + { + if (!Main.SystemDict.ContainsKey(name)) return false; + + Main.Instance.SetDefaultSystem(name); + return true; + } + public bool ChangeCurrentStarSystem(string name) { if (!Main.SystemDict.ContainsKey(name)) return false;