using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel;
using System.Runtime.Serialization;
namespace NewHorizons.External.Volumes
{
[JsonObject]
public class HazardVolumeInfo : VolumeInfo
{
///
/// The type of hazard for this volume.
///
[DefaultValue("general")] public HazardType type = HazardType.GENERAL;
///
/// The amount of damage you will take per second while inside this volume.
///
[DefaultValue(10f)] public float damagePerSecond = 10f;
///
/// The type of damage you will take when you first touch this volume.
///
[DefaultValue("impact")] public InstantDamageType firstContactDamageType = InstantDamageType.Impact;
///
/// The amount of damage you will take when you first touch this volume.
///
public float firstContactDamage;
[JsonConverter(typeof(StringEnumConverter))]
public enum HazardType
{
[EnumMember(Value = @"none")] NONE = 0,
[EnumMember(Value = @"general")] GENERAL = 1,
[EnumMember(Value = @"ghostMatter")] DARKMATTER = 2,
[EnumMember(Value = @"heat")] HEAT = 4,
[EnumMember(Value = @"fire")] FIRE = 8,
[EnumMember(Value = @"sandfall")] SANDFALL = 16,
[EnumMember(Value = @"electricity")] ELECTRICITY = 32,
[EnumMember(Value = @"rapids")] RAPIDS = 64,
[EnumMember(Value = @"riverHeat")] RIVERHEAT = 128,
}
[JsonConverter(typeof(StringEnumConverter))]
public enum InstantDamageType
{
[EnumMember(Value = @"impact")] Impact,
[EnumMember(Value = @"puncture")] Puncture,
[EnumMember(Value = @"electrical")] Electrical
}
}
}