requested changes

This commit is contained in:
TerrificTrifid 2025-01-05 20:26:52 -06:00
parent aaeb529eb6
commit 664eb0f2dd
3 changed files with 8 additions and 7 deletions

View File

@ -64,7 +64,7 @@ namespace NewHorizons.Builder.Body
enabled = false enabled = false
}; };
if (belt.assetBundle != null || belt.path != null) if (!string.IsNullOrEmpty(belt.assetBundle) || !string.IsNullOrEmpty(belt.path))
{ {
config.Props = new PropModule() config.Props = new PropModule()
{ {

View File

@ -92,6 +92,7 @@ namespace NewHorizons.Builder.Body
LODGroup.RecalculateBounds(); LODGroup.RecalculateBounds();
// do this only for LOD because only the main body uses LOD, while title screen and proxies dont
var superGroup = planetGO.GetComponent<ProxyShadowCasterSuperGroup>(); var superGroup = planetGO.GetComponent<ProxyShadowCasterSuperGroup>();
if (superGroup != null) level2.gameObject.AddComponent<ProxyShadowCaster>()._superGroup = superGroup; if (superGroup != null) level2.gameObject.AddComponent<ProxyShadowCaster>()._superGroup = superGroup;
} }

View File

@ -20,7 +20,7 @@ namespace NewHorizons.External.Modules
/// <summary> /// <summary>
/// Lowest distance from the planet asteroids can spawn /// Lowest distance from the planet asteroids can spawn
/// </summary> /// </summary>
[Range(0f, double.MaxValue)] public float innerRadius; [Range(0f, float.MaxValue)] public float innerRadius;
/// <summary> /// <summary>
/// Angle defining the point where the belt rises up from the planet's equatorial plane if inclination is nonzero. /// Angle defining the point where the belt rises up from the planet's equatorial plane if inclination is nonzero.
@ -30,19 +30,19 @@ namespace NewHorizons.External.Modules
/// <summary> /// <summary>
/// Maximum size of the asteroids. /// Maximum size of the asteroids.
/// </summary> /// </summary>
[Range(0f, double.MaxValue)] [DefaultValue(50)] [Range(0f, float.MaxValue)] [DefaultValue(50)]
public float maxSize = 50f; public float maxSize = 50f;
/// <summary> /// <summary>
/// Minimum size of the asteroids. /// Minimum size of the asteroids.
/// </summary> /// </summary>
[Range(0f, double.MaxValue)] [DefaultValue(20)] [Range(0f, float.MaxValue)] [DefaultValue(20)]
public float minSize = 20; public float minSize = 20;
/// <summary> /// <summary>
/// Greatest distance from the planet asteroids can spawn /// Greatest distance from the planet asteroids can spawn
/// </summary> /// </summary>
[Range(0f, double.MaxValue)] public float outerRadius; [Range(0f, float.MaxValue)] public float outerRadius;
/// <summary> /// <summary>
/// How the asteroids are generated, unless you supply a detail yourself using "assetBundle" and "path" /// How the asteroids are generated, unless you supply a detail yourself using "assetBundle" and "path"
@ -69,12 +69,12 @@ namespace NewHorizons.External.Modules
/// <summary> /// <summary>
/// Surface gravity of the asteroids. /// Surface gravity of the asteroids.
/// </summary> /// </summary>
[Range(0f, double.MaxValue)] [Range(0f, float.MaxValue)]
[DefaultValue(1)] [DefaultValue(1)]
public float gravity = 1f; public float gravity = 1f;
/// <summary> /// <summary>
/// Should they be randomly oriented, or all pointing towards the center. /// Should the detail of the asteroid be randomly oriented, or should it point towards the center.
/// </summary> /// </summary>
[DefaultValue(true)] [DefaultValue(true)]
public bool randomOrientation = true; public bool randomOrientation = true;