using NewHorizons.External.Modules.Volumes.VolumeInfos;
using Newtonsoft.Json;
using System.ComponentModel;
namespace NewHorizons.External.Modules.Volumes
{
[JsonObject]
public class RulesetModule
{
///
/// Add anti travel music rulesets to this planet.
/// This means no space/traveling music while inside the ruleset/volume.
/// Usually used on planets.
///
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;
}
}
}