mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Dimension scale fixes
This commit is contained in:
parent
ac7e65d4bf
commit
342599cb96
@ -22,7 +22,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
public static class BrambleDimensionBuilder
|
public static class BrambleDimensionBuilder
|
||||||
{
|
{
|
||||||
public static readonly float BASE_DIMENSION_RADIUS = 1705f;
|
public static readonly float BASE_DIMENSION_RADIUS = 750f;
|
||||||
|
|
||||||
// location of all vanilla bramble dimensions
|
// location of all vanilla bramble dimensions
|
||||||
//-9116.795 -19873.44 2480.327
|
//-9116.795 -19873.44 2480.327
|
||||||
@ -57,7 +57,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
var volumes = SearchUtilities.Find("DB_HubDimension_Body/Sector_HubDimension/Volumes_HubDimension").InstantiateInactive();
|
var volumes = SearchUtilities.Find("DB_HubDimension_Body/Sector_HubDimension/Volumes_HubDimension").InstantiateInactive();
|
||||||
var effects = SearchUtilities.Find("DB_HubDimension_Body/Sector_HubDimension/Effects_HubDimension").InstantiateInactive();
|
var effects = SearchUtilities.Find("DB_HubDimension_Body/Sector_HubDimension/Effects_HubDimension").InstantiateInactive();
|
||||||
var geometry = DetailBuilder.MakeDetail(go, sector, "DB_HubDimension_Body/Sector_HubDimension/Geometry_HubDimension", Vector3.zero, Vector3.zero, 1, false);
|
var geometry = DetailBuilder.MakeDetail(go, sector, "DB_HubDimension_Body/Sector_HubDimension/Geometry_HubDimension", Vector3.zero, Vector3.zero, 1, false);
|
||||||
var exitWarps = SearchUtilities.Find("DB_HubDimension_Body/Sector_HubDimension/OuterWarp_Hub").InstantiateInactive();
|
var exitWarps = SearchUtilities.Find("DB_HubDimension_Body/Sector_HubDimension/Interactables_HubDimension/OuterWarp_Hub").InstantiateInactive();
|
||||||
var repelVolume = SearchUtilities.Find("DB_HubDimension_Body/BrambleRepelVolume").InstantiateInactive();
|
var repelVolume = SearchUtilities.Find("DB_HubDimension_Body/BrambleRepelVolume").InstantiateInactive();
|
||||||
|
|
||||||
atmo.name = "Atmosphere";
|
atmo.name = "Atmosphere";
|
||||||
@ -150,13 +150,15 @@ namespace NewHorizons.Builder.Body
|
|||||||
// 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;
|
||||||
|
sector.gameObject.GetComponent<SphereShape>().radius *= scale;
|
||||||
outerFogWarpVolume._warpRadius *= scale;
|
outerFogWarpVolume._warpRadius *= scale;
|
||||||
outerFogWarpVolume._exitRadius *= scale;
|
outerFogWarpVolume._exitRadius *= scale;
|
||||||
|
|
||||||
var fogGO = atmo.FindChild("FogSphere_Hub");
|
var fogGO = atmo.FindChild("FogSphere_Hub");
|
||||||
var fog = fogGO.GetComponent<PlanetaryFogController>();
|
var fog = fogGO.GetComponent<PlanetaryFogController>();
|
||||||
fog._fogRadius *= scale;
|
fog._fogRadius *= scale;
|
||||||
fog._fogDensity *= scale;
|
fog._fogDensity = config.fogDensity * scale;
|
||||||
|
atmo.FindChild("FogBackdrop_Hub").transform.localScale *= scale;
|
||||||
|
|
||||||
var volumesShape = volumes.FindChild("ZeroG_Fluid_Audio_Volume");
|
var volumesShape = volumes.FindChild("ZeroG_Fluid_Audio_Volume");
|
||||||
var sphereShape = volumesShape.GetComponent<SphereShape>();
|
var sphereShape = volumesShape.GetComponent<SphereShape>();
|
||||||
@ -164,17 +166,19 @@ namespace NewHorizons.Builder.Body
|
|||||||
sphereShape.radius *= scale;
|
sphereShape.radius *= scale;
|
||||||
|
|
||||||
// Change fog color
|
// Change fog color
|
||||||
if (body.Config.Bramble.dimension.fogTint != null)
|
if (config.fogTint != null)
|
||||||
{
|
{
|
||||||
var color = body.Config.Bramble.dimension.fogTint.ToColor();
|
var color = config.fogTint.ToColor();
|
||||||
fog.fogTint = color;
|
fog.fogTint = color;
|
||||||
outerFogWarpVolume._fogColor = color;
|
outerFogWarpVolume._fogColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up repel volume to only contain this dimension
|
// Set up repel volume and cloak to scale and only contain this dimension
|
||||||
// The base game one is on the HUB dimension and encompasses all bramble dimensions and their sectors
|
// The base game one is on the HUB dimension and encompasses all bramble dimensions and their sectors
|
||||||
var cloak = repelVolume.gameObject.GetComponentInChildren<DarkBrambleCloakSphere>();
|
repelVolume.GetComponent<SphereShape>().radius = 2400f * scale;
|
||||||
cloak.transform.localScale = Vector3.one * 4000f;
|
repelVolume.GetComponent<DarkBrambleRepelVolume>()._innerRadius = 2010f * scale;
|
||||||
|
var cloak = repelVolume.GetComponentInChildren<DarkBrambleCloakSphere>();
|
||||||
|
cloak.transform.localScale = Vector3.one * 4020f * scale;
|
||||||
cloak._sectors = new Sector[] { sector };
|
cloak._sectors = new Sector[] { sector };
|
||||||
cloak.GetComponent<Renderer>().enabled = true;
|
cloak.GetComponent<Renderer>().enabled = true;
|
||||||
|
|
||||||
|
|||||||
@ -32,15 +32,20 @@ namespace NewHorizons.External.Modules
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public MColor fogTint;
|
public MColor fogTint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The density of the fog inside this dimension. The default is 6.
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue(6f)] public float fogDensity = 6f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The name of the *node* that the player is taken to when exiting this dimension.
|
/// The name of the *node* that the player is taken to when exiting this dimension.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string linksTo;
|
public string linksTo;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The internal radius (in meters) of the dimension. The default is 1705.
|
/// The internal radius (in meters) of the dimension. The default is 750 for the Hub, Escape Pod, and Angler Nest dimensions, and 500 for the others.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DefaultValue(1705f)] public float radius = 1705f;
|
[DefaultValue(750f)] public float radius = 750f;
|
||||||
|
|
||||||
/// <summary>
|
/// <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.
|
/// 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.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user