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

@ -16,13 +16,16 @@ namespace NewHorizons.Handlers
public static void RemoveStockPlanets() public static void RemoveStockPlanets()
{ {
// For some reason disabling planets immediately ruins the creation of everything else if (Main.Instance.CurrentStarSystem != "EyeOfTheUniverse")
// However, the sun breaks a lot of stuff sometimes (literally destroys it in its volumes I imagine) {
// Eg, vision torch in Mindscapes // For some reason disabling planets immediately ruins the creation of everything else
// TODO: Fix it better by disabling destruction volumes the first few frames maybe // However, the sun breaks a lot of stuff sometimes (literally destroys it in its volumes I imagine)
// Until then // Eg, vision torch in Mindscapes
// I am become death, the destroyer of worlds // TODO: Fix it better by disabling destruction volumes the first few frames maybe
SearchUtilities.Find("Sun_Body").transform.position = Vector3.left * 1000000000f; // Until then
// I am become death, the destroyer of worlds
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>();