document defaults

This commit is contained in:
JohnCorby 2022-07-11 17:08:06 -07:00
parent fcd3c8bf26
commit a505281e34
2 changed files with 192 additions and 192 deletions

View File

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

View File

@ -30,7 +30,7 @@ namespace NewHorizons.External.Modules.VariableSize
[DefaultValue(true)] public bool hasAtmosphere = true; [DefaultValue(true)] public bool hasAtmosphere = true;
/// <summary> /// <summary>
/// Colour of the light given off. /// Colour of the light given off. Defaults to yellowish.
/// </summary> /// </summary>
public MColor lightTint; public MColor lightTint;