using System.Text.Json.Serialization;
using Observatory.Framework.Files.Converters;
using Observatory.Framework.Files.ParameterTypes;
namespace Observatory.Framework.Files
{
///
/// Elite Dangerous status.json file.
///
public class Status : Journal.JournalBase
{
///
/// Set of flags representing current player state.
///
public StatusFlags Flags { get; init; }
///
/// Additional set of flags representing current player state.
/// Added in later versions of Elite Dangerous.
///
public StatusFlags2 Flags2 { get; init; }
///
/// Current allocation of power distribution (pips) between SYS, ENG, and WEP, in "half pip" increments.
///
[JsonConverter(typeof(PipConverter))]
public (int Sys, int Eng, int Wep) Pips { get; init; }
///
/// Currently selected fire group.
///
public int Firegroup { get; init; }
///
/// UI component currently focused by the player.
///
public FocusStatus GuiFocus { get; init; }
///
/// Fuel remaining in the current ship.
///
public FuelType Fuel { get; init; }
///
/// Amount of cargo currently carried.
///
public float Cargo { get; init; }
///
/// Legal status in the current jurisdiction.
///
[JsonConverter(typeof(JsonStringEnumConverter))]
public LegalStatus LegalState { get; init; }
///
/// Current altitude.
/// Check if RadialAltitude is set in StatusFlags to determine if altitude is based on planetary radius (set) or raycast to ground (unset).
///
public int Altitude { get; init; }
///
/// Latitude of current surface location.
///
public double Latitude { get; init; }
///
/// Longitude of current surface location.
///
public double Longitude { get; init; }
///
/// Current heading for surface direction.
///
public int Heading { get; init; }
///
/// Body name of current location.
///
public string BodyName { get; init; }
///
/// Radius of current planet.
///
public double PlanetRadius { get; init; }
///
/// Oxygen remaining on foot, range from 0.0 - 1.0.
///
public float Oxygen { get; init; }
///
/// Health remaining on foot, range from 0.0 - 1.0.
///
public float Health { get; init; }
///
/// Current environmental temperature in K while on foot.
///
public float Temperature { get; init; }
///
/// Name of currently selected personal weapon.
///
public string SelectedWeapon { get; init; }
///
/// Current strength of gravity while on foot, in g.
///
public float Gravity { get; init; }
///
/// Current credit balance of player.
///
public long Balance { get; init; }
///
/// Currently set destination.
///
public Destination Destination { get; init; }
}
}