From c9e9d6b48ab39cc7dd2aae186fa11f1f9035d515 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Sat, 6 Aug 2022 15:05:53 -0400 Subject: [PATCH] Fix attlerock vanilla sector components they were set to timber hearth's sector --- NewHorizons/Main.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index 2353ee56..2af15c27 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -329,6 +329,21 @@ namespace NewHorizons if (map != null) map._maxPanDistance = FurthestOrbit * 1.5f; // Fix the map satellite SearchUtilities.Find("HearthianMapSatellite_Body", false).AddComponent(); + + //Fix attlerock vanilla sector components (they were set to timber hearth's sector) + var thm = SearchUtilities.Find("Moon_Body/Sector_THM").GetComponent(); + foreach (var component in thm.GetComponentsInChildren(true)) + { + if (component is ISectorGroup sectorGroup) + { + sectorGroup.SetSector(thm); + } + + if (component is SectoredMonoBehaviour behaviour) + { + behaviour.SetSector(thm); + } + } } try