Only kill sun if theres a sun!

This commit is contained in:
Nick 2023-10-18 17:22:59 -04:00
parent 7e2f911811
commit 0b10c6d0b5

View File

@ -15,6 +15,8 @@ namespace NewHorizons.Handlers
public static readonly string[] _suspendBlacklist = new string[] { "Player_Body", "Probe_Body", "Ship_Body" }; public static readonly string[] _suspendBlacklist = new string[] { "Player_Body", "Probe_Body", "Ship_Body" };
public static void RemoveStockPlanets() public static void RemoveStockPlanets()
{
if (Main.Instance.CurrentStarSystem != "EyeOfTheUniverse")
{ {
// For some reason disabling planets immediately ruins the creation of everything else // 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) // However, the sun breaks a lot of stuff sometimes (literally destroys it in its volumes I imagine)
@ -23,6 +25,7 @@ namespace NewHorizons.Handlers
// Until then // Until then
// I am become death, the destroyer of worlds // I am become death, the destroyer of worlds
SearchUtilities.Find("Sun_Body").transform.position = Vector3.left * 1000000000f; SearchUtilities.Find("Sun_Body").transform.position = Vector3.left * 1000000000f;
}
// Adapted from EOTS thanks corby // Adapted from EOTS thanks corby
var toDisable = new List<GameObject>(); var toDisable = new List<GameObject>();