Fix attlerock vanilla sector components

they were set to timber hearth's sector
This commit is contained in:
Noah Pilarski 2022-08-06 15:05:53 -04:00
parent ea112a58c0
commit c9e9d6b48a

View File

@ -329,6 +329,21 @@ namespace NewHorizons
if (map != null) map._maxPanDistance = FurthestOrbit * 1.5f; if (map != null) map._maxPanDistance = FurthestOrbit * 1.5f;
// Fix the map satellite // Fix the map satellite
SearchUtilities.Find("HearthianMapSatellite_Body", false).AddComponent<MapSatelliteOrbitFix>(); SearchUtilities.Find("HearthianMapSatellite_Body", false).AddComponent<MapSatelliteOrbitFix>();
//Fix attlerock vanilla sector components (they were set to timber hearth's sector)
var thm = SearchUtilities.Find("Moon_Body/Sector_THM").GetComponent<Sector>();
foreach (var component in thm.GetComponentsInChildren<Component>(true))
{
if (component is ISectorGroup sectorGroup)
{
sectorGroup.SetSector(thm);
}
if (component is SectoredMonoBehaviour behaviour)
{
behaviour.SetSector(thm);
}
}
} }
try try