From 0b10c6d0b5c5dc7a398e108b99bd864da3da6951 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 18 Oct 2023 17:22:59 -0400 Subject: [PATCH] Only kill sun if theres a sun! --- .../Handlers/PlanetDestructionHandler.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/NewHorizons/Handlers/PlanetDestructionHandler.cs b/NewHorizons/Handlers/PlanetDestructionHandler.cs index 572aa834..7253c828 100644 --- a/NewHorizons/Handlers/PlanetDestructionHandler.cs +++ b/NewHorizons/Handlers/PlanetDestructionHandler.cs @@ -16,13 +16,16 @@ namespace NewHorizons.Handlers public static void RemoveStockPlanets() { - // For some reason disabling planets immediately ruins the creation of everything else - // However, the sun breaks a lot of stuff sometimes (literally destroys it in its volumes I imagine) - // Eg, vision torch in Mindscapes - // TODO: Fix it better by disabling destruction volumes the first few frames maybe - // Until then - // I am become death, the destroyer of worlds - SearchUtilities.Find("Sun_Body").transform.position = Vector3.left * 1000000000f; + if (Main.Instance.CurrentStarSystem != "EyeOfTheUniverse") + { + // For some reason disabling planets immediately ruins the creation of everything else + // However, the sun breaks a lot of stuff sometimes (literally destroys it in its volumes I imagine) + // Eg, vision torch in Mindscapes + // TODO: Fix it better by disabling destruction volumes the first few frames maybe + // Until then + // I am become death, the destroyer of worlds + SearchUtilities.Find("Sun_Body").transform.position = Vector3.left * 1000000000f; + } // Adapted from EOTS thanks corby var toDisable = new List();