From 664eb0f2dd28c60b3bef3ef135d2d25cece2d5d4 Mon Sep 17 00:00:00 2001 From: TerrificTrifid <99054745+TerrificTrifid@users.noreply.github.com> Date: Sun, 5 Jan 2025 20:26:52 -0600 Subject: [PATCH] requested changes --- NewHorizons/Builder/Body/AsteroidBeltBuilder.cs | 2 +- NewHorizons/Builder/Body/HeightMapBuilder.cs | 1 + NewHorizons/External/Modules/AsteroidBeltModule.cs | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/NewHorizons/Builder/Body/AsteroidBeltBuilder.cs b/NewHorizons/Builder/Body/AsteroidBeltBuilder.cs index 22dbe716..fdc893c7 100644 --- a/NewHorizons/Builder/Body/AsteroidBeltBuilder.cs +++ b/NewHorizons/Builder/Body/AsteroidBeltBuilder.cs @@ -64,7 +64,7 @@ namespace NewHorizons.Builder.Body enabled = false }; - if (belt.assetBundle != null || belt.path != null) + if (!string.IsNullOrEmpty(belt.assetBundle) || !string.IsNullOrEmpty(belt.path)) { config.Props = new PropModule() { diff --git a/NewHorizons/Builder/Body/HeightMapBuilder.cs b/NewHorizons/Builder/Body/HeightMapBuilder.cs index cc6f84b5..02190def 100644 --- a/NewHorizons/Builder/Body/HeightMapBuilder.cs +++ b/NewHorizons/Builder/Body/HeightMapBuilder.cs @@ -92,6 +92,7 @@ namespace NewHorizons.Builder.Body LODGroup.RecalculateBounds(); + // do this only for LOD because only the main body uses LOD, while title screen and proxies dont var superGroup = planetGO.GetComponent(); if (superGroup != null) level2.gameObject.AddComponent()._superGroup = superGroup; } diff --git a/NewHorizons/External/Modules/AsteroidBeltModule.cs b/NewHorizons/External/Modules/AsteroidBeltModule.cs index 5f2f0388..b6ac9111 100644 --- a/NewHorizons/External/Modules/AsteroidBeltModule.cs +++ b/NewHorizons/External/Modules/AsteroidBeltModule.cs @@ -20,7 +20,7 @@ namespace NewHorizons.External.Modules /// /// Lowest distance from the planet asteroids can spawn /// - [Range(0f, double.MaxValue)] public float innerRadius; + [Range(0f, float.MaxValue)] public float innerRadius; /// /// 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 /// /// Maximum size of the asteroids. /// - [Range(0f, double.MaxValue)] [DefaultValue(50)] + [Range(0f, float.MaxValue)] [DefaultValue(50)] public float maxSize = 50f; /// /// Minimum size of the asteroids. /// - [Range(0f, double.MaxValue)] [DefaultValue(20)] + [Range(0f, float.MaxValue)] [DefaultValue(20)] public float minSize = 20; /// /// Greatest distance from the planet asteroids can spawn /// - [Range(0f, double.MaxValue)] public float outerRadius; + [Range(0f, float.MaxValue)] public float outerRadius; /// /// How the asteroids are generated, unless you supply a detail yourself using "assetBundle" and "path" @@ -69,12 +69,12 @@ namespace NewHorizons.External.Modules /// /// Surface gravity of the asteroids. /// - [Range(0f, double.MaxValue)] + [Range(0f, float.MaxValue)] [DefaultValue(1)] public float gravity = 1f; /// - /// 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. /// [DefaultValue(true)] public bool randomOrientation = true;