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.VariableSize
{
[JsonObject]
public class SingularityModule : VariableSizeModule
{
[JsonConverter(typeof(StringEnumConverter))]
public enum SingularityType
{
[EnumMember(Value = @"blackHole")] BlackHole = 0,
[EnumMember(Value = @"whiteHole")] WhiteHole = 1
}
///
/// The uniqueID of the white hole or black hole that is paired to this one. If you don't set a value, entering will kill
/// the player
///
public string pairedSingularity;
///
/// The uniqueID of this white hole or black hole. If not set it will default to the name of the planet
///
public string uniqueID;
///
/// Position of the singularity
///
public MVector3 position;
///
/// Rotation of the singularity. Determines the direction you come out of a white hole
///
public MVector3 rotation;
///
/// Radius of the singularity. Note that this isn't the same as the event horizon, but includes the entire volume that
/// has warped effects in it.
///
[Obsolete("size is deprecated, please use horizonRadius and distortRadius instead")] [Range(0f, double.MaxValue)] public float size;
///
/// Radius of the event horizon (solid part)
///
[Range(0f, double.MaxValue)] public float horizonRadius;
///
/// Radius of the distortion effects. Defaults to 2.5 * horizonRadius
///
[Range(0f, double.MaxValue)] public float distortRadius;
///
/// If you want a black hole to load a new star system scene, put its name here.
///
public string targetStarSystem;
///
/// Type of singularity (white hole or black hole)
///
public SingularityType type;
///
/// Whether a black hole emits blue particles upon warping. It doesn't scale, so disabling this for small black holes is recommended
///
public bool hasWarpEffects = true;
///
/// Optional override for the render queue. If the singularity is rendering oddly, increasing this to 3000 can help
///
[Range(2501f, 3500f)] public int renderQueueOverride = 2985;
///
/// An optional rename of this object
///
public string rename;
}
}