using NewHorizons.External.Modules.Audio; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; namespace NewHorizons.External.Modules.Volumes { [JsonObject] public class VolumeInfo : GeneralPointPropInfo { /// /// The radius of this volume. /// [DefaultValue(1f)] public float radius = 1f; } [JsonObject] public class ProbeModule { /// /// Add probe destruction volumes to this planet. These will delete your probe. /// public VolumeInfo[] destructionVolumes; /// /// Add probe safety volumes to this planet. These will stop the probe destruction volumes from working. /// public VolumeInfo[] safetyVolumes; } [JsonObject] public class VisorEffectModule { /// /// Add visor frost effect volumes to this planet. This is the ghost matter effect. /// public FrostEffectVolumeInfo[] frostEffectVolumes; /// /// Add visor rain effect volumes to this planet. You can see this on Giant's Deep. /// public RainEffectVolumeInfo[] rainEffectVolumes; [JsonObject] public class FrostEffectVolumeInfo : PriorityVolumeInfo { /// /// The rate at which the frost effect will get stronger /// [DefaultValue(0.5f)] public float frostRate = 0.5f; /// /// The maximum strength of frost this volume can give /// [Range(0f, 1f)] [DefaultValue(0.91f)] public float maxFrost = 0.91f; } [JsonObject] public class RainEffectVolumeInfo : PriorityVolumeInfo { /// /// The rate at which the rain droplet effect will happen /// [DefaultValue(0.1f)] public float dropletRate = 10f; /// /// The rate at which the rain streak effect will happen /// [DefaultValue(1f)] public float streakRate = 1f; } } [JsonObject] public class RulesetModule { /// /// Add anti travel music rulesets to this planet. /// public VolumeInfo[] antiTravelMusicRulesets; /// /// Add player impact rulesets to this planet. /// public PlayerImpactRulesetInfo[] playerImpactRulesets; /// /// Add probe rulesets to this planet. /// public ProbeRulesetInfo[] probeRulesets; /// /// Add thrust rulesets to this planet. /// public ThrustRulesetInfo[] thrustRulesets; [JsonObject] public class PlayerImpactRulesetInfo : VolumeInfo { /// /// Minimum player impact speed. Player will take the minimum amount of damage if they impact something at this speed. /// [DefaultValue(20f)] public float minImpactSpeed = 20f; /// /// Maximum player impact speed. Players will die if they impact something at this speed. /// [DefaultValue(40f)] public float maxImpactSpeed = 40f; } [JsonObject] public class ProbeRulesetInfo : VolumeInfo { /// /// Should this ruleset override the probe's speed? /// public bool overrideProbeSpeed; /// /// The speed of the probe while in this ruleset volume. /// public float probeSpeed; /// /// Should this ruleset override the range of probe's light? /// public bool overrideLanternRange; /// /// The range of probe's light while in this ruleset volume. /// public float lanternRange; /// /// Stop the probe from attaching to anything while in this ruleset volume. /// public bool ignoreAnchor; } [JsonObject] public class ThrustRulesetInfo : VolumeInfo { /// /// Limit how fast you can fly with your ship while in this ruleset volume. /// [DefaultValue(float.PositiveInfinity)] public float thrustLimit = float.PositiveInfinity; /// /// Nerf the jetpack booster. /// public bool nerfJetpackBooster; /// /// How long the jetpack booster will be nerfed. /// [DefaultValue(0.5f)] public float nerfDuration = 0.5f; } } [JsonObject] public class SpeedTrapVolumeInfo : VolumeInfo { /// /// The speed the volume will slow you down to when you enter it. /// [DefaultValue(10f)] public float speedLimit = 10f; /// /// How fast it will slow down the player to the speed limit. /// [DefaultValue(3f)] public float acceleration = 3f; } }