Move OnStarSystemLoaded to not be on wake up

This commit is contained in:
Nick 2022-06-28 20:45:49 -04:00
parent d9df36bae3
commit f01471775c

View File

@ -198,15 +198,6 @@ namespace NewHorizons
private static void OnWakeUp() private static void OnWakeUp()
{ {
IsSystemReady = true; IsSystemReady = true;
try
{
Logger.Log($"Star system loaded [{Instance.CurrentStarSystem}]");
Instance.OnStarSystemLoaded?.Invoke(Instance.CurrentStarSystem);
}
catch (Exception e)
{
Logger.LogError($"Exception thrown when invoking star system loaded event with parameter [{Instance.CurrentStarSystem}] : {e.GetType().FullName} {e.Message} {e.StackTrace}");
}
} }
private void OnSceneUnloaded(Scene scene) private void OnSceneUnloaded(Scene scene)
@ -302,6 +293,16 @@ namespace NewHorizons
// Fix the map satellite // Fix the map satellite
SearchUtilities.Find("HearthianMapSatellite_Body", false).AddComponent<MapSatelliteOrbitFix>(); SearchUtilities.Find("HearthianMapSatellite_Body", false).AddComponent<MapSatelliteOrbitFix>();
try
{
Logger.Log($"Star system loaded [{Instance.CurrentStarSystem}]");
Instance.OnStarSystemLoaded?.Invoke(Instance.CurrentStarSystem);
}
catch (Exception e)
{
Logger.LogError($"Exception thrown when invoking star system loaded event with parameter [{Instance.CurrentStarSystem}] : {e.GetType().FullName} {e.Message} {e.StackTrace}");
}
} }
else else
{ {