diff --git a/NewHorizons/External/Modules/AtmosphereModule.cs b/NewHorizons/External/Modules/AtmosphereModule.cs index 926b65fd..f2b54682 100644 --- a/NewHorizons/External/Modules/AtmosphereModule.cs +++ b/NewHorizons/External/Modules/AtmosphereModule.cs @@ -1,200 +1,200 @@ -using System; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; -using NewHorizons.Utility; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace NewHorizons.External.Modules -{ - [JsonConverter(typeof(StringEnumConverter))] - public enum CloudFluidType - { - [EnumMember(Value = @"none")] None = 0, - - [EnumMember(Value = @"water")] Water = 1, - - [EnumMember(Value = @"cloud")] Cloud = 2, - - [EnumMember(Value = @"sand")] Sand = 3, - - [EnumMember(Value = @"plasma")] Plasma = 4 +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using NewHorizons.Utility; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace NewHorizons.External.Modules +{ + [JsonConverter(typeof(StringEnumConverter))] + public enum CloudFluidType + { + [EnumMember(Value = @"none")] None = 0, + + [EnumMember(Value = @"water")] Water = 1, + + [EnumMember(Value = @"cloud")] Cloud = 2, + + [EnumMember(Value = @"sand")] Sand = 3, + + [EnumMember(Value = @"plasma")] Plasma = 4 } - [JsonConverter(typeof(StringEnumConverter))] - public enum CloudPrefabType - { - [EnumMember(Value = @"giantsDeep")] GiantsDeep = 0, - + [JsonConverter(typeof(StringEnumConverter))] + public enum CloudPrefabType + { + [EnumMember(Value = @"giantsDeep")] GiantsDeep = 0, + [EnumMember(Value = @"quantumMoon")] QuantumMoon = 1, [EnumMember(Value = @"basic")] Basic = 2, - } - - [JsonObject] - public class AtmosphereModule - { - /// - /// Colour of atmospheric shader on the planet. - /// - public MColor atmosphereTint; - - /// - /// Describes the clouds in the atmosphere - /// - public CloudInfo clouds; - - /// - /// How dense the fog is, if you put fog. - /// - [Range(0f, 1f)] public float fogDensity; - - /// - /// Radius of fog sphere, independent of the atmosphere. This has to be set for there to be fog. - /// - [Range(0f, double.MaxValue)] public float fogSize; - - /// - /// Colour of fog on the planet, if you put fog. - /// - public MColor fogTint; - - /// - /// Lets you survive on the planet without a suit. - /// - public bool hasOxygen; - - /// - /// Does this planet have rain? - /// - public bool hasRain; - - /// - /// Does this planet have snow? - /// - public bool hasSnow; - - /// - /// Scale height of the atmosphere - /// - public float size; - - /// - /// Whether we use an atmospheric shader on the planet. Doesn't affect clouds, fog, rain, snow, oxygen, etc. Purely - /// visual. - /// - public bool useAtmosphereShader; - - // not an actual config thing, rip - public class AirInfo - { - public bool hasOxygen; - public bool isRaining; - public bool isSnowing; - public float scale; - } - - [JsonObject] - public class CloudInfo - { - /// - /// Should these clouds be based on Giant's Deep's banded clouds, or the Quantum Moon's non-banded clouds? - /// + } + + [JsonObject] + public class AtmosphereModule + { + /// + /// Colour of atmospheric shader on the planet. + /// + public MColor atmosphereTint; + + /// + /// Describes the clouds in the atmosphere + /// + public CloudInfo clouds; + + /// + /// How dense the fog is, if you put fog. + /// + [Range(0f, 1f)] public float fogDensity; + + /// + /// Radius of fog sphere, independent of the atmosphere. This has to be set for there to be fog. + /// + [Range(0f, double.MaxValue)] public float fogSize; + + /// + /// Colour of fog on the planet, if you put fog. + /// + public MColor fogTint; + + /// + /// Lets you survive on the planet without a suit. + /// + public bool hasOxygen; + + /// + /// Does this planet have rain? + /// + public bool hasRain; + + /// + /// Does this planet have snow? + /// + public bool hasSnow; + + /// + /// Scale height of the atmosphere + /// + public float size; + + /// + /// Whether we use an atmospheric shader on the planet. Doesn't affect clouds, fog, rain, snow, oxygen, etc. Purely + /// visual. + /// + public bool useAtmosphereShader; + + // not an actual config thing, rip + public class AirInfo + { + public bool hasOxygen; + public bool isRaining; + public bool isSnowing; + public float scale; + } + + [JsonObject] + public class CloudInfo + { + /// + /// Should these clouds be based on Giant's Deep's banded clouds, or the Quantum Moon's non-banded clouds? + /// public CloudPrefabType cloudsPrefab; - - /// - /// Relative filepath to the cloud cap texture, if the planet has clouds. - /// - public string capPath; - - /// - /// Fluid type for sounds/effects when colliding with this cloud. - /// - public CloudFluidType fluidType = CloudFluidType.Cloud; - - /// - /// Add lightning to this planet like on Giant's Deep. - /// - public bool hasLightning; - - /// - /// Radius from the center to the inner layer of the clouds. - /// - public float innerCloudRadius; - - /// - /// Colour gradient of the lightning, time is in seconds. - /// - public MGradient[] lightningGradient; - - /// - /// Radius from the center to the outer layer of the clouds. - /// - public float outerCloudRadius; - - /// - /// Relative filepath to the cloud ramp texture, if the planet has clouds. If you don't put anything here it will be - /// auto-generated. - /// - public string rampPath; - - /// - /// Relative filepath to the cloud texture, if the planet has clouds. - /// - public string texturePath; - - /// - /// Colour of the inner cloud layer. - /// - public MColor tint; - - /// - /// If the top layer shouldn't have shadows. Set to true if you're making a brown dwarf for example. - /// - public bool unlit; + + /// + /// Relative filepath to the cloud cap texture, if the planet has clouds. + /// + public string capPath; + + /// + /// Fluid type for sounds/effects when colliding with this cloud. + /// + public CloudFluidType fluidType = CloudFluidType.Cloud; + + /// + /// Add lightning to this planet like on Giant's Deep. + /// + public bool hasLightning; + + /// + /// Radius from the center to the inner layer of the clouds. + /// + public float innerCloudRadius; + + /// + /// Colour gradient of the lightning, time is in seconds. + /// + public MGradient[] lightningGradient; + + /// + /// Radius from the center to the outer layer of the clouds. + /// + public float outerCloudRadius; + + /// + /// Relative filepath to the cloud ramp texture, if the planet has clouds. If you don't put anything here it will be + /// auto-generated. + /// + public string rampPath; + + /// + /// Relative filepath to the cloud texture, if the planet has clouds. + /// + public string texturePath; + + /// + /// Colour of the inner cloud layer. Defaults to white. + /// + public MColor tint; + + /// + /// If the top layer shouldn't have shadows. Set to true if you're making a brown dwarf for example. + /// + public bool unlit; - - #region Obsolete - - /// - /// Set to `false` in order to use Giant's Deep's shader. Set to `true` to just apply the cloud texture as is. - /// - [Obsolete("useBasicCloudShader is deprecated, please use cloudsPrefab=\"basic\" instead")] - public bool useBasicCloudShader; - - #endregion Obsolete - - } - - - #region Obsolete - - [Obsolete("CloudTint is deprecated, please use CloudInfo instead")] - public MColor cloudTint; - - [Obsolete("CloudTint is deprecated, please use CloudInfo instead")] - public string cloud; - - [Obsolete("CloudCap is deprecated, please use CloudInfo instead")] - public string cloudCap; - - [Obsolete("CloudRamp is deprecated, please use CloudInfo instead")] - public string cloudRamp; - - [Obsolete("CloudFluidType is deprecated, please use CloudInfo instead")] - public CloudFluidType fluidType; - - [Obsolete("UseBasicCloudShader is deprecated, please use CloudInfo instead")] - public bool useBasicCloudShader; - - [DefaultValue(true)] [Obsolete("ShadowsOnClouds is deprecated, please use CloudInfo instead")] - public bool shadowsOnClouds = true; - - [Obsolete("HasAtmosphere is deprecated, please use UseAtmosphereShader instead")] - public bool hasAtmosphere; - - #endregion Obsolete - } + + #region Obsolete + + /// + /// Set to `false` in order to use Giant's Deep's shader. Set to `true` to just apply the cloud texture as is. + /// + [Obsolete("useBasicCloudShader is deprecated, please use cloudsPrefab=\"basic\" instead")] + public bool useBasicCloudShader; + + #endregion Obsolete + + } + + + #region Obsolete + + [Obsolete("CloudTint is deprecated, please use CloudInfo instead")] + public MColor cloudTint; + + [Obsolete("CloudTint is deprecated, please use CloudInfo instead")] + public string cloud; + + [Obsolete("CloudCap is deprecated, please use CloudInfo instead")] + public string cloudCap; + + [Obsolete("CloudRamp is deprecated, please use CloudInfo instead")] + public string cloudRamp; + + [Obsolete("CloudFluidType is deprecated, please use CloudInfo instead")] + public CloudFluidType fluidType; + + [Obsolete("UseBasicCloudShader is deprecated, please use CloudInfo instead")] + public bool useBasicCloudShader; + + [DefaultValue(true)] [Obsolete("ShadowsOnClouds is deprecated, please use CloudInfo instead")] + public bool shadowsOnClouds = true; + + [Obsolete("HasAtmosphere is deprecated, please use UseAtmosphereShader instead")] + public bool hasAtmosphere; + + #endregion Obsolete + } } \ No newline at end of file diff --git a/NewHorizons/External/Modules/VariableSize/StarModule.cs b/NewHorizons/External/Modules/VariableSize/StarModule.cs index 164d2575..627fca8c 100644 --- a/NewHorizons/External/Modules/VariableSize/StarModule.cs +++ b/NewHorizons/External/Modules/VariableSize/StarModule.cs @@ -30,7 +30,7 @@ namespace NewHorizons.External.Modules.VariableSize [DefaultValue(true)] public bool hasAtmosphere = true; /// - /// Colour of the light given off. + /// Colour of the light given off. Defaults to yellowish. /// public MColor lightTint;