mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
added option to force nodes/dimensions to only allow certan exits
This commit is contained in:
parent
590377cd51
commit
3988b5d103
@ -242,6 +242,19 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
PairExit(config.linksTo, outerFogWarpVolume);
|
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 < 0 || 5 < index) continue;
|
||||||
|
newEntrances.Add(entrances[index]);
|
||||||
|
}
|
||||||
|
outerFogWarpVolume._exits = newEntrances.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
// Set the scale
|
// Set the scale
|
||||||
var scale = config.radius / BASE_DIMENSION_RADIUS;
|
var scale = config.radius / BASE_DIMENSION_RADIUS;
|
||||||
geometry.transform.localScale = Vector3.one * scale;
|
geometry.transform.localScale = Vector3.one * scale;
|
||||||
|
|||||||
@ -214,6 +214,19 @@ namespace NewHorizons.Builder.Props
|
|||||||
fogLight._linkedLightData = new List<FogLight.LightData>();
|
fogLight._linkedLightData = new List<FogLight.LightData>();
|
||||||
|
|
||||||
sector.RegisterFogLight(fogLight);
|
sector.RegisterFogLight(fogLight);
|
||||||
|
|
||||||
|
// If the config says only certain entrances 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 < 0 || 5 < index) continue;
|
||||||
|
newExits.Add(exits[index]);
|
||||||
|
}
|
||||||
|
innerFogWarpVolume._exits = newExits.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
// set up screen fog effect
|
// set up screen fog effect
|
||||||
// (in the base game, any sector that contains a bramble node needs an EffectRuleset with type FogWarp)
|
// (in the base game, any sector that contains a bramble node needs an EffectRuleset with type FogWarp)
|
||||||
|
|||||||
10
NewHorizons/External/Modules/BrambleModule.cs
vendored
10
NewHorizons/External/Modules/BrambleModule.cs
vendored
@ -41,6 +41,11 @@ namespace NewHorizons.External.Modules
|
|||||||
/// The internal radius (in meters) of the dimension. The default is 1705.
|
/// The internal radius (in meters) of the dimension. The default is 1705.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DefaultValue(1705f)] public float radius = 1705f;
|
[DefaultValue(1705f)] public float radius = 1705f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An array of integers from 0-5. By default, all entrances are allowed. To force this dimension to warp players in from only one point (like the anglerfish nest dimension in the base game) set this value to [3], [5], or similar. Values of 0-5 only.
|
||||||
|
/// </summary>
|
||||||
|
public int[] allowedEntrances;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -86,6 +91,11 @@ namespace NewHorizons.External.Modules
|
|||||||
/// The color of the shafts of light coming from the entrances to the node. Leave blank for the default yellowish color: (131, 124, 105, 255)
|
/// The color of the shafts of light coming from the entrances to the node. Leave blank for the default yellowish color: (131, 124, 105, 255)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public MColor lightTint;
|
public MColor lightTint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An array of integers from 0-5. By default, all entrances are allowed. To force this node to warp players out from only one hole set this value to [3], [5], or similar. Values of 0-5 only.
|
||||||
|
/// </summary>
|
||||||
|
public int[] possibleExits;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user