Rename onlyAffectsPlayerAndShip to onlyAffectsPlayerRelatedBodies

because this is what it actually does
This commit is contained in:
Noah Pilarski 2023-07-12 02:44:49 -04:00
parent 5503d2aad0
commit b51b702313
3 changed files with 16 additions and 5 deletions

View File

@ -26,7 +26,7 @@ namespace NewHorizons.Builder.Volumes
volume._collider = collider; volume._collider = collider;
volume._shrinkBodies = info.shrinkBodies; volume._shrinkBodies = info.shrinkBodies;
volume._onlyAffectsPlayerAndShip = info.onlyAffectsPlayerAndShip; volume._onlyAffectsPlayerAndShip = info.onlyAffectsPlayerRelatedBodies;
go.SetActive(true); go.SetActive(true);

View File

@ -217,7 +217,7 @@ namespace NewHorizons.External.Configs
if (Base.centerOfSolarSystem) Orbit.isStatic = true; if (Base.centerOfSolarSystem) Orbit.isStatic = true;
if (Atmosphere?.clouds?.lightningGradient != null) Atmosphere.clouds.hasLightning = 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 && 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; if (Orbit?.staticPosition != null) Orbit.isStatic = true;
// For each quantum group, verify the following: // For each quantum group, verify the following:
@ -463,7 +463,7 @@ namespace NewHorizons.External.Configs
if (ring.curve != null) ring.scaleCurve = ring.curve; if (ring.curve != null) ring.scaleCurve = ring.curve;
} }
} }
if (Base.zeroGravityRadius != 0f) if (Base.zeroGravityRadius != 0f)
{ {
Volumes ??= new VolumesModule(); Volumes ??= new VolumesModule();
@ -616,6 +616,14 @@ namespace NewHorizons.External.Configs
CometTail.rotationOverride = Base.cometTailRotation; CometTail.rotationOverride = Base.cometTailRotation;
} }
} }
if (Volumes?.destructionVolumes != null)
{
foreach (var destructionVolume in Volumes.destructionVolumes)
{
if (destructionVolume.onlyAffectsPlayerAndShip) destructionVolume.onlyAffectsPlayerRelatedBodies = true;
}
}
} }
#endregion #endregion
} }

View File

@ -1,4 +1,5 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
using System.ComponentModel; using System.ComponentModel;
namespace NewHorizons.External.Modules.Volumes.VolumeInfos namespace NewHorizons.External.Modules.Volumes.VolumeInfos
@ -12,9 +13,11 @@ namespace NewHorizons.External.Modules.Volumes.VolumeInfos
[DefaultValue(true)] public bool shrinkBodies = true; [DefaultValue(true)] public bool shrinkBodies = true;
/// <summary> /// <summary>
/// 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.
/// </summary> /// </summary>
public bool onlyAffectsPlayerAndShip; public bool onlyAffectsPlayerRelatedBodies;
[Obsolete] public bool onlyAffectsPlayerAndShip;
} }
} }