diff --git a/NewHorizons/Builder/General/PlanetDestroyer.cs b/NewHorizons/Builder/General/PlanetDestroyer.cs index 30f6d608..f1518c4e 100644 --- a/NewHorizons/Builder/General/PlanetDestroyer.cs +++ b/NewHorizons/Builder/General/PlanetDestroyer.cs @@ -43,11 +43,11 @@ namespace NewHorizons.Builder.General foreach(var name in _solarSystemBodies) { var ao = AstroObjectLocator.GetAstroObject(name); - if (ao != null) Main.Instance.ModHelper.Events.Unity.FireOnNextUpdate(() => RemoveBody(ao, false)); + if (ao != null) Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => RemoveBody(ao, false), 2); } // Bring the sun back because why not - Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => { if (Locator.GetAstroObject(AstroObject.Name.Sun).gameObject.activeInHierarchy) { sunVolumes.SetActive(true); } }, 2); + Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => { if (Locator.GetAstroObject(AstroObject.Name.Sun).gameObject.activeInHierarchy) { sunVolumes.SetActive(true); } }, 3); } public static void RemoveBody(AstroObject ao, bool delete = false, List toDestroy = null) diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 9fb2d0ea..7fe0378a 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -128,8 +128,8 @@ namespace NewHorizons.Handlers if (body.Config.Destroy) { var ao = existingPlanet.GetComponent(); - if (ao != null) Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => PlanetDestroyer.RemoveBody(ao), 1); - else Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => existingPlanet.SetActive(false), 1); + if (ao != null) Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => PlanetDestroyer.RemoveBody(ao), 2); + else Main.Instance.ModHelper.Events.Unity.FireInNUpdates(() => existingPlanet.SetActive(false), 2); } else UpdateBody(body, existingPlanet); } diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index 659bf650..6b17697e 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -429,7 +429,7 @@ namespace NewHorizons public string[] GetInstalledAddons() { - return Main.MountedAddons.ConvertAll(x => x.ModHelper.Manifest.UniqueName).ToArray(); + return Main.MountedAddons.Select(x => x.ModHelper.Manifest.UniqueName).ToArray(); } } #endregion API