diff --git a/NewHorizons/External/Modules/AtmosphereModule.cs b/NewHorizons/External/Modules/AtmosphereModule.cs index 11a0b3f5..758df744 100644 --- a/NewHorizons/External/Modules/AtmosphereModule.cs +++ b/NewHorizons/External/Modules/AtmosphereModule.cs @@ -8,6 +8,7 @@ using Newtonsoft.Json.Converters; namespace NewHorizons.External.Modules { + [JsonConverter(typeof(StringEnumConverter))] public enum CloudFluidType { [EnumMember(Value = @"none")] None = 0, @@ -94,7 +95,6 @@ namespace NewHorizons.External.Modules /// /// Fluid type for sounds/effects when colliding with this cloud. /// - [JsonConverter(typeof(StringEnumConverter))] public CloudFluidType fluidType = CloudFluidType.Cloud; /// @@ -160,7 +160,6 @@ namespace NewHorizons.External.Modules public string cloudRamp; [Obsolete("CloudFluidType is deprecated, please use CloudInfo instead")] - [JsonConverter(typeof(StringEnumConverter))] public CloudFluidType fluidType; [Obsolete("UseBasicCloudShader is deprecated, please use CloudInfo instead")] diff --git a/NewHorizons/External/Modules/BaseModule.cs b/NewHorizons/External/Modules/BaseModule.cs index df25cbf2..28f2f8ba 100644 --- a/NewHorizons/External/Modules/BaseModule.cs +++ b/NewHorizons/External/Modules/BaseModule.cs @@ -7,6 +7,7 @@ using Newtonsoft.Json.Converters; namespace NewHorizons.External.Modules { + [JsonConverter(typeof(StringEnumConverter))] public enum GravityFallOff { [EnumMember(Value = @"linear")] Linear = 0, @@ -43,7 +44,6 @@ namespace NewHorizons.External.Modules /// /// How gravity falls off with distance. Most planets use linear but the sun and some moons use inverseSquared. /// - [JsonConverter(typeof(StringEnumConverter))] public GravityFallOff gravityFallOff = GravityFallOff.Linear; /// diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs index 0cf9081a..93bbe253 100644 --- a/NewHorizons/External/Modules/PropModule.cs +++ b/NewHorizons/External/Modules/PropModule.cs @@ -185,6 +185,7 @@ namespace NewHorizons.External.Modules [JsonObject] public class TornadoInfo { + [JsonConverter(typeof(StringEnumConverter))] public enum TornadoType { [EnumMember(Value = @"downwards")] Downwards = 0, @@ -222,7 +223,6 @@ namespace NewHorizons.External.Modules /// /// What type of cyclone should this be? Upwards and downwards are both tornados and will push in that direction. /// - [JsonConverter(typeof(StringEnumConverter))] public TornadoType type = TornadoType.Downwards; /// @@ -337,6 +337,7 @@ namespace NewHorizons.External.Modules [JsonObject] public class RevealInfo { + [JsonConverter(typeof(StringEnumConverter))] public enum RevealVolumeType { [EnumMember(Value = @"enter")] Enter = 0, @@ -369,7 +370,6 @@ namespace NewHorizons.External.Modules /// /// What needs to be done to the volume to unlock the facts /// - [JsonConverter(typeof(StringEnumConverter))] public RevealVolumeType revealOn = RevealVolumeType.Enter; /// @@ -400,6 +400,7 @@ namespace NewHorizons.External.Modules [JsonObject] public class NomaiTextInfo { + [JsonConverter(typeof(StringEnumConverter))] public enum NomaiTextType { [EnumMember(Value = @"wall")] Wall = 0, @@ -442,7 +443,6 @@ namespace NewHorizons.External.Modules /// /// The type of object this is. /// - [JsonConverter(typeof(StringEnumConverter))] public NomaiTextType type = NomaiTextType.Wall; /// @@ -454,6 +454,7 @@ namespace NewHorizons.External.Modules [JsonObject] public class NomaiTextArcInfo { + [JsonConverter(typeof(StringEnumConverter))] public enum NomaiTextArcType { [EnumMember(Value = @"adult")] Adult = 0, @@ -471,7 +472,6 @@ namespace NewHorizons.External.Modules /// /// The type of text to display. /// - [JsonConverter(typeof(StringEnumConverter))] public NomaiTextArcType type = NomaiTextArcType.Adult; /// @@ -483,6 +483,7 @@ namespace NewHorizons.External.Modules [JsonObject] public class ProjectionInfo { + [JsonConverter(typeof(StringEnumConverter))] public enum SlideShowType { [EnumMember(Value = @"slideReel")] SlideReel = 0, @@ -513,7 +514,6 @@ namespace NewHorizons.External.Modules /// /// The type of object this is. /// - [JsonConverter(typeof(StringEnumConverter))] public SlideShowType type = SlideShowType.SlideReel; } diff --git a/NewHorizons/External/Modules/VariableSize/FunnelModule.cs b/NewHorizons/External/Modules/VariableSize/FunnelModule.cs index b3e9d238..81a21dee 100644 --- a/NewHorizons/External/Modules/VariableSize/FunnelModule.cs +++ b/NewHorizons/External/Modules/VariableSize/FunnelModule.cs @@ -5,6 +5,7 @@ using Newtonsoft.Json.Converters; namespace NewHorizons.External.Modules.VariableSize { + [JsonConverter(typeof(StringEnumConverter))] public enum FunnelType { [EnumMember(Value = @"sand")] Sand = 0, @@ -32,7 +33,6 @@ namespace NewHorizons.External.Modules.VariableSize /// /// Type of fluid the funnel transfers /// - [JsonConverter(typeof(StringEnumConverter))] public FunnelType type = FunnelType.Sand; } } \ No newline at end of file diff --git a/NewHorizons/External/Modules/VariableSize/SingularityModule.cs b/NewHorizons/External/Modules/VariableSize/SingularityModule.cs index f1a06c13..001dcb56 100644 --- a/NewHorizons/External/Modules/VariableSize/SingularityModule.cs +++ b/NewHorizons/External/Modules/VariableSize/SingularityModule.cs @@ -10,6 +10,7 @@ namespace NewHorizons.External.Modules.VariableSize [JsonObject] public class SingularityModule : VariableSizeModule { + [JsonConverter(typeof(StringEnumConverter))] public enum SingularityType { [EnumMember(Value = @"blackHole")] BlackHole = 0, @@ -47,7 +48,6 @@ namespace NewHorizons.External.Modules.VariableSize /// /// Type of singularity (white hole or black hole) /// - [JsonConverter(typeof(StringEnumConverter))] public SingularityType type; } } \ No newline at end of file