Add more to the descriptions of volumes (#634)

## Improvements
- Added more to the descriptions of volumes
This commit is contained in:
Nick 2023-07-13 00:55:06 -04:00 committed by GitHub
commit 93c49f11ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 52 additions and 27 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

@ -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

@ -7,12 +7,14 @@ namespace NewHorizons.External.Modules.Volumes
public class ProbeModule public class ProbeModule
{ {
/// <summary> /// <summary>
/// Add probe destruction volumes to this planet. These will delete your probe. /// Add probe destruction volumes to this planet.
/// These will delete your probe just like the eye of the universe does.
/// </summary> /// </summary>
public VolumeInfo[] destructionVolumes; public VolumeInfo[] destructionVolumes;
/// <summary> /// <summary>
/// Add probe safety volumes to this planet. These will stop the probe destruction volumes from working. /// Add probe safety volumes to this planet.
/// These will stop the probe destruction volumes from working.
/// </summary> /// </summary>
public VolumeInfo[] safetyVolumes; public VolumeInfo[] safetyVolumes;
} }

View File

@ -9,6 +9,8 @@ namespace NewHorizons.External.Modules.Volumes
{ {
/// <summary> /// <summary>
/// Add anti travel music rulesets to this planet. /// Add anti travel music rulesets to this planet.
/// This means no space/traveling music while inside the ruleset/volume.
/// Usually used on planets.
/// </summary> /// </summary>
public VolumeInfo[] antiTravelMusicRulesets; public VolumeInfo[] antiTravelMusicRulesets;
/// <summary> /// <summary>

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;
} }
} }

View File

@ -13,6 +13,7 @@ namespace NewHorizons.External.Modules.Volumes
/// <summary> /// <summary>
/// Add destruction volumes to this planet. /// Add destruction volumes to this planet.
/// Destroys bodies if they enter this volume. Can kill the player and recall the scout probe.
/// </summary> /// </summary>
public DestructionVolumeInfo[] destructionVolumes; public DestructionVolumeInfo[] destructionVolumes;
@ -23,31 +24,38 @@ namespace NewHorizons.External.Modules.Volumes
/// <summary> /// <summary>
/// Add hazard volumes to this planet. /// Add hazard volumes to this planet.
/// Causes damage to player when inside this volume.
/// </summary> /// </summary>
public HazardVolumeInfo[] hazardVolumes; public HazardVolumeInfo[] hazardVolumes;
/// <summary> /// <summary>
/// Add interference volumes to this planet. /// Add interference volumes to this planet.
/// Hides HUD markers of ship scout/probe and prevents scout photos if you are not inside the volume together with ship or scout probe.
/// </summary> /// </summary>
public VolumeInfo[] interferenceVolumes; public VolumeInfo[] interferenceVolumes;
/// <summary> /// <summary>
/// Add insulating volumes to this planet. These will stop electricty hazard volumes from affecting you (just like the jellyfish). /// Add insulating volumes to this planet.
/// These will stop electricty hazard volumes from affecting you (just like the jellyfish).
/// </summary> /// </summary>
public VolumeInfo[] insulatingVolumes; public VolumeInfo[] insulatingVolumes;
/// <summary> /// <summary>
/// Add light source volumes to this planet. These will activate rafts and other light detectors. /// Add light source volumes to this planet.
/// These will activate rafts and other light detectors.
/// </summary> /// </summary>
public VolumeInfo[] lightSourceVolumes; public VolumeInfo[] lightSourceVolumes;
/// <summary> /// <summary>
/// Add map restriction volumes to this planet. /// Add map restriction volumes to this planet.
/// The map will be disabled when inside this volume.
/// </summary> /// </summary>
public VolumeInfo[] mapRestrictionVolumes; public VolumeInfo[] mapRestrictionVolumes;
/// <summary> /// <summary>
/// Add notification volumes to this planet. /// Add notification volumes to this planet.
/// Sends a notification to the player just like ghost matter does when you get too close
/// and also to the ship just like when you damage a component on the ship.
/// </summary> /// </summary>
public NotificationVolumeInfo[] notificationVolumes; public NotificationVolumeInfo[] notificationVolumes;
@ -62,7 +70,8 @@ namespace NewHorizons.External.Modules.Volumes
public ProbeModule probe; public ProbeModule probe;
/// <summary> /// <summary>
/// Add reference frame blocker volumes to this planet. These will stop the player from seeing/targeting any reference frames. /// Add reference frame blocker volumes to this planet.
/// These will stop the player from seeing/targeting any reference frames.
/// </summary> /// </summary>
public VolumeInfo[] referenceFrameBlockerVolumes; public VolumeInfo[] referenceFrameBlockerVolumes;
@ -82,7 +91,8 @@ namespace NewHorizons.External.Modules.Volumes
public RulesetModule rulesets; public RulesetModule rulesets;
/// <summary> /// <summary>
/// Add speed trap volumes to this planet. Slows down the player when they enter this volume. /// Add speed trap volumes to this planet.
/// Slows down the player when they enter this volume.
/// </summary> /// </summary>
public SpeedTrapVolumeInfo[] speedTrapVolumes; public SpeedTrapVolumeInfo[] speedTrapVolumes;

View File

@ -3263,7 +3263,7 @@
}, },
"destructionVolumes": { "destructionVolumes": {
"type": "array", "type": "array",
"description": "Add destruction volumes to this planet.", "description": "Add destruction volumes to this planet.\nDestroys bodies if they enter this volume. Can kill the player and recall the scout probe.",
"items": { "items": {
"$ref": "#/definitions/DestructionVolumeInfo" "$ref": "#/definitions/DestructionVolumeInfo"
} }
@ -3277,42 +3277,42 @@
}, },
"hazardVolumes": { "hazardVolumes": {
"type": "array", "type": "array",
"description": "Add hazard volumes to this planet.", "description": "Add hazard volumes to this planet.\nCauses damage to player when inside this volume.",
"items": { "items": {
"$ref": "#/definitions/HazardVolumeInfo" "$ref": "#/definitions/HazardVolumeInfo"
} }
}, },
"interferenceVolumes": { "interferenceVolumes": {
"type": "array", "type": "array",
"description": "Add interference volumes to this planet.", "description": "Add interference volumes to this planet.\nHides HUD markers of ship scout/probe and prevents scout photos if you are not inside the volume together with ship or scout probe.",
"items": { "items": {
"$ref": "#/definitions/VolumeInfo" "$ref": "#/definitions/VolumeInfo"
} }
}, },
"insulatingVolumes": { "insulatingVolumes": {
"type": "array", "type": "array",
"description": "Add insulating volumes to this planet. These will stop electricty hazard volumes from affecting you (just like the jellyfish).", "description": "Add insulating volumes to this planet.\nThese will stop electricty hazard volumes from affecting you (just like the jellyfish).",
"items": { "items": {
"$ref": "#/definitions/VolumeInfo" "$ref": "#/definitions/VolumeInfo"
} }
}, },
"lightSourceVolumes": { "lightSourceVolumes": {
"type": "array", "type": "array",
"description": "Add light source volumes to this planet. These will activate rafts and other light detectors.", "description": "Add light source volumes to this planet.\nThese will activate rafts and other light detectors.",
"items": { "items": {
"$ref": "#/definitions/VolumeInfo" "$ref": "#/definitions/VolumeInfo"
} }
}, },
"mapRestrictionVolumes": { "mapRestrictionVolumes": {
"type": "array", "type": "array",
"description": "Add map restriction volumes to this planet.", "description": "Add map restriction volumes to this planet.\nThe map will be disabled when inside this volume.",
"items": { "items": {
"$ref": "#/definitions/VolumeInfo" "$ref": "#/definitions/VolumeInfo"
} }
}, },
"notificationVolumes": { "notificationVolumes": {
"type": "array", "type": "array",
"description": "Add notification volumes to this planet.", "description": "Add notification volumes to this planet.\nSends a notification to the player just like ghost matter does when you get too close\nand also to the ship just like when you damage a component on the ship.",
"items": { "items": {
"$ref": "#/definitions/NotificationVolumeInfo" "$ref": "#/definitions/NotificationVolumeInfo"
} }
@ -3330,7 +3330,7 @@
}, },
"referenceFrameBlockerVolumes": { "referenceFrameBlockerVolumes": {
"type": "array", "type": "array",
"description": "Add reference frame blocker volumes to this planet. These will stop the player from seeing/targeting any reference frames.", "description": "Add reference frame blocker volumes to this planet.\nThese will stop the player from seeing/targeting any reference frames.",
"items": { "items": {
"$ref": "#/definitions/VolumeInfo" "$ref": "#/definitions/VolumeInfo"
} }
@ -3355,7 +3355,7 @@
}, },
"speedTrapVolumes": { "speedTrapVolumes": {
"type": "array", "type": "array",
"description": "Add speed trap volumes to this planet. Slows down the player when they enter this volume.", "description": "Add speed trap volumes to this planet.\nSlows down the player when they enter this volume.",
"items": { "items": {
"$ref": "#/definitions/SpeedTrapVolumeInfo" "$ref": "#/definitions/SpeedTrapVolumeInfo"
} }
@ -3494,9 +3494,9 @@
"description": "Whether the bodies will shrink when they enter this volume or just disappear instantly.", "description": "Whether the bodies will shrink when they enter this volume or just disappear instantly.",
"default": true "default": true
}, },
"onlyAffectsPlayerAndShip": { "onlyAffectsPlayerRelatedBodies": {
"type": "boolean", "type": "boolean",
"description": "Whether this volume only affects the player and ship." "description": "Whether this volume only affects the player, ship, probe/scout, model rocket ship, and nomai shuttle."
}, },
"radius": { "radius": {
"type": "number", "type": "number",
@ -3859,14 +3859,14 @@
"properties": { "properties": {
"destructionVolumes": { "destructionVolumes": {
"type": "array", "type": "array",
"description": "Add probe destruction volumes to this planet. These will delete your probe.", "description": "Add probe destruction volumes to this planet.\nThese will delete your probe just like the eye of the universe does.",
"items": { "items": {
"$ref": "#/definitions/VolumeInfo" "$ref": "#/definitions/VolumeInfo"
} }
}, },
"safetyVolumes": { "safetyVolumes": {
"type": "array", "type": "array",
"description": "Add probe safety volumes to this planet. These will stop the probe destruction volumes from working.", "description": "Add probe safety volumes to this planet.\nThese will stop the probe destruction volumes from working.",
"items": { "items": {
"$ref": "#/definitions/VolumeInfo" "$ref": "#/definitions/VolumeInfo"
} }
@ -3968,14 +3968,14 @@
"properties": { "properties": {
"antiTravelMusicRulesets": { "antiTravelMusicRulesets": {
"type": "array", "type": "array",
"description": "Add anti travel music rulesets to this planet.", "description": "Add anti travel music rulesets to this planet.\nThis means no space/traveling music while inside the ruleset/volume.\nUsually used on planets.",
"items": { "items": {
"$ref": "#/definitions/VolumeInfo" "$ref": "#/definitions/VolumeInfo"
} }
}, },
"playerImpactRulesets": { "playerImpactRulesets": {
"type": "array", "type": "array",
"description": "Add player impact rulesets to this planet.", "description": "Add player impact rulesets to this planet. ",
"items": { "items": {
"$ref": "#/definitions/PlayerImpactRulesetInfo" "$ref": "#/definitions/PlayerImpactRulesetInfo"
} }