mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Rename sphereOfInfluence to soiOverride
This commit is contained in:
parent
df66d4ef8d
commit
e833512bda
@ -18,7 +18,7 @@ namespace NewHorizons.Builder.General
|
|||||||
// To let you actually orbit things the way you would expect we cap this at 4x the diameter if its not a star or black hole (this is what giants deep has)
|
// To let you actually orbit things the way you would expect we cap this at 4x the diameter if its not a star or black hole (this is what giants deep has)
|
||||||
if (config.Star == null && config.Singularity == null) gravityRadius = Mathf.Min(gravityRadius, 4 * config.Base.surfaceSize);
|
if (config.Star == null && config.Singularity == null) gravityRadius = Mathf.Min(gravityRadius, 4 * config.Base.surfaceSize);
|
||||||
else gravityRadius = Mathf.Min(gravityRadius, 15 * config.Base.surfaceSize);
|
else gravityRadius = Mathf.Min(gravityRadius, 15 * config.Base.surfaceSize);
|
||||||
if (config.Base.sphereOfInfluence != 0f) gravityRadius = config.Base.sphereOfInfluence;
|
if (config.Base.soiOverride != 0f) gravityRadius = config.Base.soiOverride;
|
||||||
|
|
||||||
var gravityGO = new GameObject("GravityWell");
|
var gravityGO = new GameObject("GravityWell");
|
||||||
gravityGO.transform.parent = planetGO.transform;
|
gravityGO.transform.parent = planetGO.transform;
|
||||||
|
|||||||
@ -57,7 +57,7 @@ namespace NewHorizons.Builder.Orbital
|
|||||||
|
|
||||||
// Other stuff to make the fake barycenter not interact with anything in any way
|
// Other stuff to make the fake barycenter not interact with anything in any way
|
||||||
fakeMassConfig.name = config.name + "_FakeBarycenterMass";
|
fakeMassConfig.name = config.name + "_FakeBarycenterMass";
|
||||||
fakeMassConfig.Base.sphereOfInfluence = 0;
|
fakeMassConfig.Base.soiOverride = 0;
|
||||||
fakeMassConfig.Base.hasMapMarker = false;
|
fakeMassConfig.Base.hasMapMarker = false;
|
||||||
fakeMassConfig.ReferenceFrame.hideInMap = true;
|
fakeMassConfig.ReferenceFrame.hideInMap = true;
|
||||||
|
|
||||||
|
|||||||
2
NewHorizons/External/Configs/PlanetConfig.cs
vendored
2
NewHorizons/External/Configs/PlanetConfig.cs
vendored
@ -245,6 +245,8 @@ namespace NewHorizons.External.Configs
|
|||||||
foreach (var tornado in Props.tornados)
|
foreach (var tornado in Props.tornados)
|
||||||
if (tornado.downwards)
|
if (tornado.downwards)
|
||||||
tornado.type = PropModule.TornadoInfo.TornadoType.Downwards;
|
tornado.type = PropModule.TornadoInfo.TornadoType.Downwards;
|
||||||
|
|
||||||
|
if (Base.sphereOfInfluence != 0f) Base.soiOverride = Base.sphereOfInfluence;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
5
NewHorizons/External/Modules/BaseModule.cs
vendored
5
NewHorizons/External/Modules/BaseModule.cs
vendored
@ -69,7 +69,7 @@ namespace NewHorizons.External.Modules
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An override for the radius of the planet's gravitational sphere of influence. Optional
|
/// An override for the radius of the planet's gravitational sphere of influence. Optional
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float sphereOfInfluence;
|
public float soiOverride;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The acceleration due to gravity felt as the surfaceSize. Timber Hearth has 12 for reference
|
/// The acceleration due to gravity felt as the surfaceSize. Timber Hearth has 12 for reference
|
||||||
@ -112,6 +112,9 @@ namespace NewHorizons.External.Modules
|
|||||||
[Obsolete("CloakRadius is deprecated, please use CloakModule instead")]
|
[Obsolete("CloakRadius is deprecated, please use CloakModule instead")]
|
||||||
public float cloakRadius;
|
public float cloakRadius;
|
||||||
|
|
||||||
|
[Obsolete("SphereOfInfluence is deprecated, please use soiOverride instead")]
|
||||||
|
public float sphereOfInfluence;
|
||||||
|
|
||||||
#endregion Obsolete
|
#endregion Obsolete
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -365,7 +365,7 @@ namespace NewHorizons.Handlers
|
|||||||
{
|
{
|
||||||
var atmoSize = body.Config.Atmosphere != null ? body.Config.Atmosphere.size : 0f;
|
var atmoSize = body.Config.Atmosphere != null ? body.Config.Atmosphere.size : 0f;
|
||||||
float sphereOfInfluence = Mathf.Max(Mathf.Max(atmoSize, 50), body.Config.Base.surfaceSize * 2f);
|
float sphereOfInfluence = Mathf.Max(Mathf.Max(atmoSize, 50), body.Config.Base.surfaceSize * 2f);
|
||||||
var overrideSOI = body.Config.Base.sphereOfInfluence;
|
var overrideSOI = body.Config.Base.soiOverride;
|
||||||
if (overrideSOI != 0) sphereOfInfluence = overrideSOI;
|
if (overrideSOI != 0) sphereOfInfluence = overrideSOI;
|
||||||
return sphereOfInfluence;
|
return sphereOfInfluence;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user