2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 08:23:42 -04:00

Initial Commit

This commit is contained in:
2024-04-13 15:54:59 +10:00
parent 8e178cbb7b
commit 63ed43f4af
459 changed files with 8039 additions and 20504 deletions

View File

@ -1,10 +1,9 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class ApproachBody : JournalBase
{
public class ApproachBody : JournalBase
{
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
}
}
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
}

View File

@ -1,103 +1,102 @@
using System;
using System.Collections.Immutable;
using System.Text.Json.Serialization;
using Observatory.Framework.Files.Converters;
using Observatory.Framework.Files.ParameterTypes;
using System.Collections.Immutable;
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class Docked : JournalBase
{
public class Docked : JournalBase
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public ulong MarketID { get; init; }
[JsonConverter(typeof(LegacyFactionConverter<Faction>))]
public Faction StationFaction { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage), JsonConverter(typeof(LegacyFactionConverter<Faction>))]
public Faction Faction
{
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public ulong MarketID { get; init; }
[JsonConverter(typeof(Converters.LegacyFactionConverter<Faction>))]
public Faction StationFaction { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage), JsonConverter(typeof(Converters.LegacyFactionConverter<Faction>))]
public Faction Faction
private get
{
private get
{
return StationFaction;
}
init
{
StationFaction = value;
}
}
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string FactionState
{
private get
{
return StationFaction.FactionState;
}
init
{
//Stale Data, discard
}
}
public string StationGovernment { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Government
{
private get { return StationGovernment; }
init { StationGovernment = value; }
}
public string StationGovernment_Localised { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Government_Localised
{
private get { return StationGovernment_Localised; }
init { StationGovernment_Localised = value; }
}
public string StationAllegiance { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Allegiance
{
private get { return StationAllegiance; }
init { StationAllegiance = value; }
}
[JsonConverter(typeof(Converters.StationServiceConverter))]
public StationService StationServices { get; init; }
public string StationEconomy { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Economy
{
private get { return StationEconomy; }
init { StationEconomy = value; }
}
public string StationEconomy_Localised { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Economy_Localised
{
private get { return StationEconomy_Localised; }
init { StationEconomy_Localised = value; }
}
public ImmutableList<StationEconomy> StationEconomies { get; init; }
[Obsolete("StationState is a rundundant property. Use StationEconomy to potentially reduce unnecessary checks.")]
public string StationState { get; init; }
public float DistFromStarLS { get; init; }
public bool Wanted { get; init; }
public bool ActiveFine { get; init; }
public bool CockpitBreach { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
return StationFaction;
}
init
{
StationFaction = value;
}
}
}
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string FactionState
{
private get
{
return StationFaction.FactionState;
}
init
{
//Stale Data, discard
}
}
public string StationGovernment { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Government
{
private get { return StationGovernment; }
init { StationGovernment = value; }
}
public string StationGovernment_Localised { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Government_Localised
{
private get { return StationGovernment_Localised; }
init { StationGovernment_Localised = value; }
}
public string StationAllegiance { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Allegiance
{
private get { return StationAllegiance; }
init { StationAllegiance = value; }
}
[JsonConverter(typeof(StationServiceConverter))]
public StationService StationServices { get; init; }
public string StationEconomy { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Economy
{
private get { return StationEconomy; }
init { StationEconomy = value; }
}
public string StationEconomy_Localised { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string Economy_Localised
{
private get { return StationEconomy_Localised; }
init { StationEconomy_Localised = value; }
}
public ImmutableList<StationEconomy> StationEconomies { get; init; }
[Obsolete("StationState is a rundundant property. Use StationEconomy to potentially reduce unnecessary checks.")]
public string StationState { get; init; }
public float DistFromStarLS { get; init; }
public bool Wanted { get; init; }
public bool ActiveFine { get; init; }
public bool CockpitBreach { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
}

View File

@ -1,5 +1,4 @@
namespace Observatory.Framework.Files.Journal
{
public class DockingCancelled : DockingRequested
{ }
}
namespace Observatory.Framework.Files.Journal.Travel;
public class DockingCancelled : DockingRequested
{ }

View File

@ -1,11 +1,10 @@
using System.Text.Json.Serialization;
using Observatory.Framework.Files.ParameterTypes;
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class DockingDenied : DockingCancelled
{
public class DockingDenied : DockingCancelled
{
[JsonConverter(typeof(JsonStringEnumConverter))]
public Reason Reason { get; init; }
}
}
[JsonConverter(typeof(JsonStringEnumConverter))]
public Reason Reason { get; init; }
}

View File

@ -1,7 +1,6 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class DockingGranted : DockingCancelled
{
public class DockingGranted : DockingCancelled
{
public int LandingPad { get; init; }
}
}
public int LandingPad { get; init; }
}

View File

@ -1,15 +1,14 @@
using Observatory.Framework.Files.ParameterTypes;
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class DockingRequested : JournalBase
{
public class DockingRequested : JournalBase
{
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public ulong MarketID { get; init; }
public LandingPads LandingPads { get; init; }
}
}
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public ulong MarketID { get; init; }
public LandingPads LandingPads { get; init; }
}

View File

@ -1,6 +1,5 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class DockingTimeout : DockingRequested
{
public class DockingTimeout : DockingRequested
{
}
}
}

View File

@ -1,54 +1,53 @@
using System;
using System.Collections.Immutable;
using System.Text.Json.Serialization;
using Observatory.Framework.Files.Converters;
using Observatory.Framework.Files.ParameterTypes;
using System.Collections.Immutable;
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class FSDJump : JournalBase
{
public class FSDJump : JournalBase
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
[JsonConverter(typeof(StarPosConverter))]
public (double x, double y, double z) StarPos { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
public string BodyType { get; init; }
public double JumpDist { get; init; }
public double FuelUsed { get; init; }
public double FuelLevel { get; init; }
public int BoostUsed { get; init; }
[JsonConverter(typeof(LegacyFactionConverter<SystemFaction>))]
public SystemFaction SystemFaction { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string FactionState
{
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
[JsonConverter(typeof(Converters.StarPosConverter))]
public (double x, double y, double z) StarPos { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
public string BodyType { get; init; }
public double JumpDist { get; init; }
public double FuelUsed { get; init; }
public double FuelLevel { get; init; }
public int BoostUsed { get; init; }
[JsonConverter(typeof(Converters.LegacyFactionConverter<SystemFaction>))]
public SystemFaction SystemFaction { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string FactionState
get
{
get
{
return SystemFaction.FactionState;
}
init
{
init
{
//Stale Data, discard
}
}
public string SystemAllegiance { get; init; }
public string SystemEconomy { get; init; }
public string SystemEconomy_Localised { get; init; }
public string SystemSecondEconomy { get; init; }
public string SystemSecondEconomy_Localised { get; init; }
public string SystemGovernment { get; init; }
public string SystemGovernment_Localised { get; init; }
public string SystemSecurity { get; init; }
public string SystemSecurity_Localised { get; init; }
public long Population { get; init; }
public bool Wanted { get; init; }
public ImmutableList<SystemFaction> Factions { get; init; }
public ImmutableList<Conflict> Conflicts { get; init; }
public ImmutableList<string> Powers { get; init; }
public string PowerplayState { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
public ThargoidWar ThargoidWar { get; init; }
}
}
public string SystemAllegiance { get; init; }
public string SystemEconomy { get; init; }
public string SystemEconomy_Localised { get; init; }
public string SystemSecondEconomy { get; init; }
public string SystemSecondEconomy_Localised { get; init; }
public string SystemGovernment { get; init; }
public string SystemGovernment_Localised { get; init; }
public string SystemSecurity { get; init; }
public string SystemSecurity_Localised { get; init; }
public long Population { get; init; }
public bool Wanted { get; init; }
public ImmutableList<SystemFaction> Factions { get; init; }
public ImmutableList<Conflict> Conflicts { get; init; }
public ImmutableList<string> Powers { get; init; }
public string PowerplayState { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
public ThargoidWar ThargoidWar { get; init; }
}

View File

@ -1,10 +1,9 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class FSDTarget : JournalBase
{
public class FSDTarget : JournalBase
{
public string Name { get; init; }
public ulong SystemAddress { get; init; }
public string StarClass { get; init; }
public int RemainingJumpsInRoute { get; init; }
}
}
public string Name { get; init; }
public ulong SystemAddress { get; init; }
public string StarClass { get; init; }
public int RemainingJumpsInRoute { get; init; }
}

View File

@ -1,10 +1,9 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class LeaveBody : JournalBase
{
public class LeaveBody : JournalBase
{
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
}
}
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
}

View File

@ -1,5 +1,4 @@
namespace Observatory.Framework.Files.Journal
{
public class Liftoff : Touchdown
{ }
}
namespace Observatory.Framework.Files.Journal.Travel;
public class Liftoff : Touchdown
{ }

View File

@ -1,76 +1,74 @@
using System;
using System.Collections.Immutable;
using System.Text.Json.Serialization;
using Observatory.Framework.Files.ParameterTypes;
using Observatory.Framework.Files.Converters;
using System.Collections.Immutable;
using Observatory.Framework.Files.ParameterTypes;
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class Location : JournalBase
{
public class Location : JournalBase
{
[JsonConverter(typeof(IntBoolFlexConverter))]
public bool Docked { get; init; }
public double DistFromStarLS { get; init; }
[JsonConverter(typeof(IntBoolFlexConverter))]
public bool Docked { get; init; }
public double DistFromStarLS { get; init; }
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string FactionState
[Obsolete(JournalUtilities.ObsoleteMessage)]
public string FactionState
{
get
{
get
{
return SystemFaction.FactionState;
}
init
{
init
{
//Stale Data, discard
}
}
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public float Longitude { get; init; }
public float Latitude { get; init; }
public ulong MarketID { get; init; }
[JsonConverter(typeof(LegacyFactionConverter<Faction>))]
public Faction StationFaction { get; init; }
public string StationGovernment { get; init; }
public string StationGovernment_Localised { get; init; }
public string StationAllegiance { get; init; }
public ImmutableList<string> StationServices { get; init; }
public string StationEconomy { get; init; }
public string StationEconomy_Localised { get; init; }
public ImmutableList<StationEconomy> StationEconomies { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
[JsonConverter(typeof(StarPosConverter))]
public (double x, double y, double z) StarPos { get; init; }
public string SystemAllegiance { get; init; }
public string SystemEconomy { get; init; }
public string SystemEconomy_Localised { get; init; }
public string SystemSecondEconomy { get; init; }
public string SystemSecondEconomy_Localised { get; init; }
public string SystemGovernment { get; init; }
public string SystemGovernment_Localised { get; init; }
public string SystemSecurity { get; init; }
public string SystemSecurity_Localised { get; init; }
public long Population { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
public string BodyType { get; init; }
public ImmutableList<DetailedFaction> Factions { get; init; }
[JsonConverter(typeof(LegacyFactionConverter<DetailedFaction>))]
public DetailedFaction SystemFaction { get; init; }
public ImmutableList<Conflict> Conflicts { get; init; }
public ImmutableList<string> Powers { get; init; }
public string PowerplayState { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
public bool OnFoot { get; init; }
public bool InSRV { get; init; }
public ThargoidWar ThargoidWar { get; init; }
}
}
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public float Longitude { get; init; }
public float Latitude { get; init; }
public ulong MarketID { get; init; }
[JsonConverter(typeof(LegacyFactionConverter<Faction>))]
public Faction StationFaction { get; init; }
public string StationGovernment { get; init; }
public string StationGovernment_Localised { get; init; }
public string StationAllegiance { get; init; }
public ImmutableList<string> StationServices { get; init; }
public string StationEconomy { get; init; }
public string StationEconomy_Localised { get; init; }
public ImmutableList<StationEconomy> StationEconomies { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
[JsonConverter(typeof(StarPosConverter))]
public (double x, double y, double z) StarPos { get; init; }
public string SystemAllegiance { get; init; }
public string SystemEconomy { get; init; }
public string SystemEconomy_Localised { get; init; }
public string SystemSecondEconomy { get; init; }
public string SystemSecondEconomy_Localised { get; init; }
public string SystemGovernment { get; init; }
public string SystemGovernment_Localised { get; init; }
public string SystemSecurity { get; init; }
public string SystemSecurity_Localised { get; init; }
public long Population { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
public string BodyType { get; init; }
public ImmutableList<DetailedFaction> Factions { get; init; }
[JsonConverter(typeof(LegacyFactionConverter<DetailedFaction>))]
public DetailedFaction SystemFaction { get; init; }
public ImmutableList<Conflict> Conflicts { get; init; }
public ImmutableList<string> Powers { get; init; }
public string PowerplayState { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
public bool OnFoot { get; init; }
public bool InSRV { get; init; }
public ThargoidWar ThargoidWar { get; init; }
}

View File

@ -1,6 +1,5 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class NavRoute : JournalBase
{
public class NavRoute : JournalBase
{
}
}
}

View File

@ -1,6 +1,5 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class NavRouteClear : JournalBase
{
public class NavRouteClear : JournalBase
{
}
}
}

View File

@ -1,11 +1,10 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class StartJump : JournalBase
{
public class StartJump : JournalBase
{
public string JumpType { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public string StarClass { get; init; }
public bool Taxi { get; init; }
}
}
public string JumpType { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public string StarClass { get; init; }
public bool Taxi { get; init; }
}

View File

@ -1,9 +1,8 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class SupercruiseDestinationDrop : JournalBase
{
public class SupercruiseDestinationDrop : JournalBase
{
public string Type { get; init; }
public int Threat { get; init; }
public ulong MarketID { get; init; }
}
}
public string Type { get; init; }
public int Threat { get; init; }
public ulong MarketID { get; init; }
}

View File

@ -1,11 +1,10 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class SupercruiseEntry : JournalBase
{
public class SupercruiseEntry : JournalBase
{
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
public bool? Wanted { get; init; }
}
}
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
public bool? Wanted { get; init; }
}

View File

@ -1,9 +1,8 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class SupercruiseExit : SupercruiseEntry
{
public class SupercruiseExit : SupercruiseEntry
{
public string Body { get; init; }
public int BodyID { get; init; }
public string BodyType { get; init; }
}
}
public string Body { get; init; }
public int BodyID { get; init; }
public string BodyType { get; init; }
}

View File

@ -1,19 +1,18 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class Touchdown : JournalBase
{
public class Touchdown : JournalBase
{
public double Latitude { get; init; }
public double Longitude { get; init; }
public string NearestDestination { get; init; }
public string NearestDestination_Localised { get; init; }
public bool PlayerControlled { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
public bool OnStation { get; init; }
public bool OnPlanet { get; init; }
}
}
public double Latitude { get; init; }
public double Longitude { get; init; }
public string NearestDestination { get; init; }
public string NearestDestination_Localised { get; init; }
public bool PlayerControlled { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
public string Body { get; init; }
public int BodyID { get; init; }
public bool OnStation { get; init; }
public bool OnPlanet { get; init; }
}

View File

@ -1,14 +1,13 @@
namespace Observatory.Framework.Files.Journal
namespace Observatory.Framework.Files.Journal.Travel;
public class Undocked : JournalBase
{
public class Undocked : JournalBase
{
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public ulong MarketID { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
}
}
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public ulong MarketID { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }
}