From 9717da115e201fa5b1ee2d2bb2aba3d3d82348d1 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sat, 23 Jul 2022 18:04:57 -0700 Subject: [PATCH] only find skybox if we need to destroy it --- NewHorizons/Handlers/SystemCreationHandler.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/NewHorizons/Handlers/SystemCreationHandler.cs b/NewHorizons/Handlers/SystemCreationHandler.cs index 52762c3a..bd69d0cb 100644 --- a/NewHorizons/Handlers/SystemCreationHandler.cs +++ b/NewHorizons/Handlers/SystemCreationHandler.cs @@ -10,11 +10,9 @@ namespace NewHorizons.Handlers { public static void LoadSystem(NewHorizonsSystem system) { - var skybox = SearchUtilities.Find("Skybox/Starfield"); - if (system.Config.Skybox?.destroyStarField ?? false) { - Object.Destroy(skybox); + Object.Destroy(SearchUtilities.Find("Skybox/Starfield")); } if (system.Config.Skybox?.rightPath != null ||