From c46caf40e85eaed7e33f968afb4cfc1c7da0ecb6 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 26 Aug 2023 16:33:48 -0400 Subject: [PATCH] Don't update if its already updated --- NewHorizons/Handlers/PlanetCreationHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 31556ca6..2ff9a98b 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -747,7 +747,8 @@ namespace NewHorizons.Handlers var aoType = ao.GetAstroObjectType(); // When updating orbits of the twins be sure the FocalBody is gone - if (aoName == AstroObject.Name.TowerTwin || aoName == AstroObject.Name.CaveTwin) + // Don't do it if it's already an NHAstroObject since that means this was already done + if (ao is not NHAstroObject && (aoName == AstroObject.Name.TowerTwin || aoName == AstroObject.Name.CaveTwin)) { var hourglassTwinsFocal = SearchUtilities.Find("FocalBody");