using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel; using System.Runtime.Serialization; namespace NewHorizons.External.Volumes { [JsonObject] public class FluidVolumeInfo : PriorityVolumeInfo { /// /// Density of the fluid. The higher the density, the harder it is to go through this fluid. /// [DefaultValue(1.2f)] public float density = 1.2f; /// /// The type of fluid for this volume. /// public FluidType type; /// /// Should the player and rafts align to this fluid. /// [DefaultValue(true)] public bool alignmentFluid = true; /// /// Should the ship align to the fluid by rolling. /// public bool allowShipAutoroll; /// /// Disable this fluid volume immediately? /// public bool disableOnStart; [JsonConverter(typeof(StringEnumConverter))] public enum FluidType { [EnumMember(Value = @"none")] NONE = 0, [EnumMember(Value = @"air")] AIR, [EnumMember(Value = @"water")] WATER, [EnumMember(Value = @"cloud")] CLOUD, [EnumMember(Value = @"sand")] SAND, [EnumMember(Value = @"plasma")] PLASMA, [EnumMember(Value = @"fog")] FOG } } }