added farfogcolor option to bramble nodes

This commit is contained in:
FreezeDriedMangoes 2022-07-15 09:34:47 -04:00
parent 3988b5d103
commit bd73c93694
2 changed files with 12 additions and 1 deletions

View File

@ -268,6 +268,13 @@ namespace NewHorizons.Builder.Props
if (config.isSeed) SetSeedColors(brambleNode, config.fogTint?.ToColor(), config.lightTint?.ToColor());
else SetNodeColors(brambleNode, config.fogTint?.ToColor(), config.lightTint?.ToColor());
innerFogWarpVolume._useFarFogColor = false;
if (config.farFogTint != null)
{
innerFogWarpVolume._useFarFogColor = true;
innerFogWarpVolume._farFogColor = config.farFogTint.ToColor();
}
// Set up warps
innerFogWarpVolume._sector = sector;
innerFogWarpVolume._attachedBody = go.GetComponent<OWRigidbody>(); // I don't think this is necessary, it seems to be set correctly on its own
@ -305,7 +312,6 @@ namespace NewHorizons.Builder.Props
var fogRenderer = brambleNode.GetComponent<InnerFogWarpVolume>();
fogRenderer._fogColor = fogTint.Value;
fogRenderer._useFarFogColor = false;
var fogBackdrop = brambleNode.FindChild("Terrain_DB_BrambleSphere_Inner_v2")?.FindChild("fogbackdrop_v2");
if (fogBackdrop != null) fogBackdrop.GetComponent<MeshRenderer>().sharedMaterial.color = (Color)fogTint;

View File

@ -92,6 +92,11 @@ namespace NewHorizons.External.Modules
/// </summary>
public MColor lightTint;
/// <summary>
/// The color a dimension's background fog turns when you approach this node (if it's in a dimension). If this node is not in a dimension, this does nothing. Leave blank for the default yellowish white color: (255, 245, 217, 255)
/// </summary>
public MColor farFogTint;
/// <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>