diff --git a/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs b/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs index 48be7181..9bc2a514 100644 --- a/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs @@ -26,7 +26,7 @@ namespace NewHorizons.Builder.Volumes volume._collider = collider; volume._shrinkBodies = info.shrinkBodies; - volume._onlyAffectsPlayerAndShip = info.onlyAffectsPlayerAndShip; + volume._onlyAffectsPlayerAndShip = info.onlyAffectsPlayerRelatedBodies; go.SetActive(true); diff --git a/NewHorizons/External/Configs/PlanetConfig.cs b/NewHorizons/External/Configs/PlanetConfig.cs index 260896b3..e76225c4 100644 --- a/NewHorizons/External/Configs/PlanetConfig.cs +++ b/NewHorizons/External/Configs/PlanetConfig.cs @@ -217,7 +217,7 @@ namespace NewHorizons.External.Configs if (Base.centerOfSolarSystem) Orbit.isStatic = true; if (Atmosphere?.clouds?.lightningGradient != null) Atmosphere.clouds.hasLightning = true; if (Bramble?.dimension != null && Orbit?.staticPosition == null) throw new Exception($"Dimension {name} must have Orbit.staticPosition defined."); - if (Bramble?.dimension != null) canShowOnTitle = false; + if (Bramble?.dimension != null) canShowOnTitle = false; if (Orbit?.staticPosition != null) Orbit.isStatic = true; // For each quantum group, verify the following: @@ -463,7 +463,7 @@ namespace NewHorizons.External.Configs if (ring.curve != null) ring.scaleCurve = ring.curve; } } - + if (Base.zeroGravityRadius != 0f) { Volumes ??= new VolumesModule(); @@ -616,6 +616,14 @@ namespace NewHorizons.External.Configs CometTail.rotationOverride = Base.cometTailRotation; } } + + if (Volumes?.destructionVolumes != null) + { + foreach (var destructionVolume in Volumes.destructionVolumes) + { + if (destructionVolume.onlyAffectsPlayerAndShip) destructionVolume.onlyAffectsPlayerRelatedBodies = true; + } + } } #endregion } diff --git a/NewHorizons/External/Modules/Volumes/VolumeInfos/VanishVolumeInfo.cs b/NewHorizons/External/Modules/Volumes/VolumeInfos/VanishVolumeInfo.cs index 0cab17e6..bb66b0a8 100644 --- a/NewHorizons/External/Modules/Volumes/VolumeInfos/VanishVolumeInfo.cs +++ b/NewHorizons/External/Modules/Volumes/VolumeInfos/VanishVolumeInfo.cs @@ -1,4 +1,5 @@ using Newtonsoft.Json; +using System; using System.ComponentModel; namespace NewHorizons.External.Modules.Volumes.VolumeInfos @@ -12,9 +13,11 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos [DefaultValue(true)] public bool shrinkBodies = true; /// - /// Whether this volume only affects the player and ship. + /// Whether this volume only affects the player, ship, probe/scout, model rocket ship, and nomai shuttle. /// - public bool onlyAffectsPlayerAndShip; + public bool onlyAffectsPlayerRelatedBodies; + + [Obsolete] public bool onlyAffectsPlayerAndShip; } }