using NewHorizons.External.Modules.SerializableEnums; using NewHorizons.Utility; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System; using System.ComponentModel; using System.Runtime.Serialization; namespace NewHorizons.External.Modules.Props { [JsonObject] public class TornadoInfo : GeneralPropInfo { [JsonConverter(typeof(StringEnumConverter))] public enum TornadoType { [EnumMember(Value = @"upwards")] Upwards = 0, [EnumMember(Value = @"downwards")] Downwards = 1, [EnumMember(Value = @"hurricane")] Hurricane = 2 } [Obsolete("Downwards is deprecated. Use Type instead.")] public bool downwards; /// /// Alternative to setting the position. Will choose a random place at this elevation. /// public float elevation; /// /// The height of this tornado. /// [DefaultValue(30f)] public float height = 30f; /// /// The colour of the tornado. /// public MColor tint; /// /// What type of cyclone should this be? Upwards and downwards are both tornados and will push in that direction. /// [DefaultValue("upwards")] public TornadoType type = TornadoType.Upwards; /// /// Angular distance from the starting position that it will wander, in terms of the angle around the x-axis. /// [DefaultValue(45f)] public float wanderDegreesX = 45f; /// /// Angular distance from the starting position that it will wander, in terms of the angle around the z-axis. /// [DefaultValue(45f)] public float wanderDegreesZ = 45f; /// /// The rate at which the tornado will wander around the planet. Set to 0 for it to be stationary. Should be around /// 0.1. /// public float wanderRate; /// /// The maximum distance at which you'll hear the sounds of the cyclone. If not set it will scale relative to the size of the cyclone. /// public float audioDistance; /// /// Fluid type for sounds/effects when colliding with this tornado. /// [DefaultValue("cloud")] public FluidType fluidType = FluidType.Cloud; } }