mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
add a sector for eotp (because water)
This commit is contained in:
parent
e38bff6cca
commit
02ecb2dd27
@ -26,6 +26,9 @@ namespace NewHorizons.Handlers
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
var scene = SearchUtilities.Find("Scene");
|
||||
scene.AddComponent<FakeSector>();
|
||||
|
||||
var planetRoot = SearchUtilities.Find("Scene/Background/PlanetPivot/PlanetRoot");
|
||||
var campfire = SearchUtilities.Find("Scene/Background/PlanetPivot/Prefab_HEA_Campfire");
|
||||
campfire.transform.SetParent(planetRoot.transform, true);
|
||||
@ -127,10 +130,12 @@ namespace NewHorizons.Handlers
|
||||
Delay.FireOnNextUpdate(() => ambienceSource.AssignAudioLibraryClip(audioType));
|
||||
}
|
||||
|
||||
var background = SearchUtilities.Find("Scene/Background");
|
||||
var menuPlanet = SearchUtilities.Find("Scene/Background/PlanetPivot");
|
||||
var sector = background.GetComponentInParent<Sector>();
|
||||
|
||||
if (config.Background != null)
|
||||
{
|
||||
var background = SearchUtilities.Find("Scene/Background");
|
||||
|
||||
if (config.Background.removeChildren != null)
|
||||
{
|
||||
RemoveChildren(background, config.Background.removeChildren);
|
||||
@ -140,7 +145,7 @@ namespace NewHorizons.Handlers
|
||||
{
|
||||
foreach (var simplifiedDetail in config.Background.details)
|
||||
{
|
||||
DetailBuilder.Make(background, null, mod, new DetailInfo(simplifiedDetail));
|
||||
DetailBuilder.Make(background, sector, mod, new DetailInfo(simplifiedDetail));
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,8 +155,6 @@ namespace NewHorizons.Handlers
|
||||
|
||||
if (config.MenuPlanet != null)
|
||||
{
|
||||
var menuPlanet = SearchUtilities.Find("Scene/Background/PlanetPivot");
|
||||
|
||||
if (config.MenuPlanet.removeChildren != null)
|
||||
{
|
||||
RemoveChildren(menuPlanet, config.MenuPlanet.removeChildren);
|
||||
@ -161,7 +164,7 @@ namespace NewHorizons.Handlers
|
||||
{
|
||||
foreach (var simplifiedDetail in config.MenuPlanet.details)
|
||||
{
|
||||
DetailBuilder.Make(menuPlanet, null, mod, new DetailInfo(simplifiedDetail));
|
||||
DetailBuilder.Make(menuPlanet, sector, mod, new DetailInfo(simplifiedDetail));
|
||||
}
|
||||
}
|
||||
|
||||
@ -501,5 +504,14 @@ namespace NewHorizons.Handlers
|
||||
bool KnowsFact();
|
||||
bool HasCondition();
|
||||
}
|
||||
|
||||
private class FakeSector : Sector
|
||||
{
|
||||
public override void Awake()
|
||||
{
|
||||
_occupantMask = DynamicOccupant.Player;
|
||||
SectorManager.RegisterSector(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user