From 16d2b034c08e4e8dea60dbf4033f217e0435077a Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Wed, 10 Aug 2022 01:54:32 -0400 Subject: [PATCH] Add sector streaming to moons and don't set parent sector. --- NewHorizons/Main.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index 5635bdd3..08c7c45e 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -331,12 +331,11 @@ namespace NewHorizons // Fix the map satellite SearchUtilities.Find("HearthianMapSatellite_Body", false).AddComponent(); - + // Sector changes (so that projection pools actually turn off proxies and cull groups on these moons) //Fix attlerock vanilla sector components (they were set to timber hearth's sector) var thm = SearchUtilities.Find("Moon_Body/Sector_THM").GetComponent(); - thm.SetParentSector(SearchUtilities.Find("TimberHearth_Body/Sector_TH").GetComponent()); foreach (var component in thm.GetComponentsInChildren(true)) { if (component is ISectorGroup sectorGroup) @@ -349,10 +348,15 @@ namespace NewHorizons behaviour.SetSector(thm); } } + var thm_ss_obj = new GameObject("Sector_Streaming"); + thm_ss_obj.transform.SetParent(thm.transform, false); + var thm_ss = thm_ss_obj.AddComponent(); + thm_ss._streamingGroup = SearchUtilities.Find("TimberHearth_Body/StreamingGroup_TH").GetComponent(); + thm_ss.SetSector(thm); + //Fix hollow's lantern vanilla sector components (they were set to brittle hollow's sector) var vm = SearchUtilities.Find("VolcanicMoon_Body/Sector_VM").GetComponent(); - vm.SetParentSector(SearchUtilities.Find("BrittleHollow_Body/Sector_BH").GetComponent()); foreach (var component in vm.GetComponentsInChildren(true)) { if (component is ISectorGroup sectorGroup) @@ -365,6 +369,11 @@ namespace NewHorizons behaviour.SetSector(vm); } } + var vm_ss_obj = new GameObject("Sector_Streaming"); + vm_ss_obj.transform.SetParent(vm.transform, false); + var vm_ss = vm_ss_obj.AddComponent(); + vm_ss._streamingGroup = SearchUtilities.Find("BrittleHollow_Body/StreamingGroup_BH").GetComponent(); + vm_ss.SetSector(vm); //Fix brittle hollow north pole projection platform var northPoleSurface = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_NorthHemisphere/Sector_NorthPole/Sector_NorthPoleSurface").GetComponent();