mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix bramble exits
This commit is contained in:
parent
a177bbffca
commit
c919b17c47
@ -139,19 +139,6 @@ namespace NewHorizons.Builder.Body
|
||||
|
||||
PairExit(config.linksTo, outerFogWarpVolume);
|
||||
|
||||
// If the config says only certain entrances are allowed, enforce that
|
||||
if (config.allowedEntrances != null)
|
||||
{
|
||||
var entrances = outerFogWarpVolume._exits;
|
||||
var newEntrances = new List<SphericalFogWarpExit>();
|
||||
foreach (var index in config.allowedEntrances)
|
||||
{
|
||||
if(index is < 0 or > 5) continue;
|
||||
newEntrances.Add(entrances[index]);
|
||||
}
|
||||
outerFogWarpVolume._exits = newEntrances.ToArray();
|
||||
}
|
||||
|
||||
// Set the scale
|
||||
var scale = config.radius / BASE_DIMENSION_RADIUS;
|
||||
geometry.transform.localScale = Vector3.one * scale;
|
||||
@ -199,6 +186,22 @@ namespace NewHorizons.Builder.Body
|
||||
exitWarps.SetActive(true);
|
||||
repelVolume.SetActive(true);
|
||||
|
||||
// If the config says only certain entrances are allowed, enforce that
|
||||
if (config.allowedEntrances != null)
|
||||
{
|
||||
Delay.FireOnNextUpdate(() =>
|
||||
{
|
||||
var entrances = outerFogWarpVolume._exits;
|
||||
var newEntrances = new List<SphericalFogWarpExit>();
|
||||
foreach (var index in config.allowedEntrances)
|
||||
{
|
||||
if (index is < 0 or > 5) continue;
|
||||
newEntrances.Add(entrances[index]);
|
||||
}
|
||||
outerFogWarpVolume._exits = newEntrances.ToArray();
|
||||
});
|
||||
}
|
||||
|
||||
return go;
|
||||
}
|
||||
|
||||
|
||||
@ -194,19 +194,6 @@ namespace NewHorizons.Builder.Props
|
||||
fogLight._linkedFogLights = new List<FogLight>();
|
||||
fogLight._linkedLightData = new List<FogLight.LightData>();
|
||||
|
||||
// If the config says only certain exits are allowed, enforce that
|
||||
if (config.possibleExits != null)
|
||||
{
|
||||
var exits = innerFogWarpVolume._exits;
|
||||
var newExits = new List<SphericalFogWarpExit>();
|
||||
foreach (var index in config.possibleExits)
|
||||
{
|
||||
if(index is < 0 or > 5) continue;
|
||||
newExits.Add(exits[index]);
|
||||
}
|
||||
innerFogWarpVolume._exits = newExits.ToArray();
|
||||
}
|
||||
|
||||
// Set up screen fog effect
|
||||
var fogEffectRuleset = sector.gameObject.GetAddComponent<EffectRuleset>();
|
||||
fogEffectRuleset._attachedBody = sector.GetAttachedOWRigidbody();
|
||||
@ -338,8 +325,25 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
// Done!
|
||||
brambleNode.SetActive(true);
|
||||
|
||||
// If the config says only certain exits are allowed, enforce that
|
||||
if (config.possibleExits != null)
|
||||
{
|
||||
Delay.FireOnNextUpdate(() =>
|
||||
{
|
||||
var exits = innerFogWarpVolume._exits;
|
||||
var newExits = new List<SphericalFogWarpExit>();
|
||||
foreach (var index in config.possibleExits)
|
||||
{
|
||||
if (index is < 0 or > 5) continue;
|
||||
newExits.Add(exits[index]);
|
||||
}
|
||||
innerFogWarpVolume._exits = newExits.ToArray();
|
||||
});
|
||||
}
|
||||
|
||||
// Done!
|
||||
return brambleNode;
|
||||
|
||||
static Color CalculateLightShaftTint(float H, float S, float V)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user