mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'dev' of https://github.com/xen-42/outer-wilds-new-horizons into dev
This commit is contained in:
commit
d9eaa04ba1
@ -242,6 +242,19 @@ 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 < 0 || 5 < index) 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;
|
||||
|
||||
@ -214,6 +214,19 @@ namespace NewHorizons.Builder.Props
|
||||
fogLight._linkedLightData = new List<FogLight.LightData>();
|
||||
|
||||
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
|
||||
// (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.
|
||||
/// </summary>
|
||||
[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)
|
||||
/// </summary>
|
||||
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