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

Implement Other state events

now emitted to websocket connections on connect
This commit is contained in:
2024-05-25 22:49:08 +10:00
parent 68eff73dbd
commit 7eae5e5ee6
68 changed files with 222 additions and 182 deletions

View File

@ -6,7 +6,7 @@ namespace Observatory.Framework.Files.Journal.Combat;
public class Bounty : JournalBase
{
public override string Event => "Bounty";
public IReadOnlyCollection<Rewards> Rewards { get; init; }
public List<Rewards> Rewards { get; init; }
public string PilotName { get; set; }
public string PilotName_Localised { get; set; }
public string Target { get; init; }

View File

@ -10,5 +10,5 @@ public class Died : JournalBase
public string KillerName_Localised { get; init; }
public string KillerShip { get; init; }
public string KillerRank { get; init; }
public IReadOnlyCollection<Killer> Killers { get; init; }
public List<Killer> Killers { get; init; }
}

View File

@ -71,7 +71,7 @@ public class CodexEntry : JournalBase
/// <summary>
/// List of trais of the scanned item.
/// </summary>
public ICollection<string> Traits { get; init; }
public IList<string> Traits { get; init; }
/// <summary>
/// Value of the codex entry when sold to Universal Cartographics.
/// </summary>

View File

@ -12,7 +12,7 @@ public class MultiSellExplorationData : JournalBase
/// <summary>
/// List of all sold first discoveries.
/// </summary>
public IReadOnlyCollection<Discovered> Discovered { get; init; }
public List<Discovered> Discovered { get; init; }
/// <summary>
/// Base value of total sold data.
/// </summary>

View File

@ -23,11 +23,11 @@ public class SAAScanComplete : JournalBase
/// <summary>
/// This property is indicated with strikethrough in Frontier's documentation and is likely unused.
/// </summary>
public ICollection<string> Discoverers { get; init; }
public IList<string> Discoverers { get; init; }
/// <summary>
/// This property is indicated with strikethrough in Frontier's documentation and is likely unused.
/// </summary>
public ICollection<string> Mappers { get; init; }
public IList<string> Mappers { get; init; }
/// <summary>
/// Number of probes fired to complete the surface scan.
/// </summary>

View File

@ -24,9 +24,9 @@ public class SAASignalsFound : JournalBase
/// <summary>
/// List of signals found.
/// </summary>
public IReadOnlyCollection<Signal> Signals { get; init; }
public List<Signal> Signals { get; init; }
/// <summary>
/// List of genuses present.
/// </summary>
public IReadOnlyCollection<GenusType> Genuses { get; init; }
public List<GenusType> Genuses { get; init; }
}

View File

@ -22,7 +22,7 @@ public class Scan : ScanBaryCentre
/// <summary>
/// List which reflects Frontier's JSON structure for the "Parents" object. Use of Parent property is recommended instead.
/// </summary>
public IReadOnlyCollection<Parent> Parents {
public List<Parent> Parents {
get => _Parents;
init
{
@ -51,8 +51,8 @@ public class Scan : ScanBaryCentre
/// "Parents" object rearranged into more intuitive structure for ease of use.
/// </summary>
[JsonIgnore]
public IReadOnlyCollection<(ParentType ParentType, int Body)> Parent { get; init; }
private IReadOnlyCollection<Parent> _Parents;
public List<(ParentType ParentType, int Body)> Parent { get; init; }
private List<Parent> _Parents;
/// <summary>
/// Body distance from system arrival point in light-seconds.
/// </summary>
@ -80,7 +80,7 @@ public class Scan : ScanBaryCentre
/// <summary>
/// List containing full breakdown of atmospheric components and their relative percentages.
/// </summary>
public IReadOnlyCollection<MaterialComposition> AtmosphereComposition { get; init; }
public List<MaterialComposition> AtmosphereComposition { get; init; }
/// <summary>
/// Descriptive string for type of volcanism present, or an empty string for none, e.g. "major silicate vapour geysers volcanism".
/// </summary>
@ -113,7 +113,7 @@ public class Scan : ScanBaryCentre
/// List containing full breakdown of prospectable surface materials and their relative percentages.
/// </summary>
[JsonConverter(typeof(MaterialCompositionConverter))]
public IReadOnlyCollection<MaterialComposition> Materials { get; init; }
public List<MaterialComposition> Materials { get; init; }
/// <summary>
/// Overall composition of body, expressed as percentages of ice, rock, and metal.
/// </summary>
@ -130,7 +130,7 @@ public class Scan : ScanBaryCentre
/// <summary>
/// List of all planetary or stellar ring systems around the body.
/// </summary>
public IReadOnlyCollection<Ring> Rings { get; init; }
public List<Ring> Rings { get; init; }
/// <summary>
/// Description of the minable material abundance.<br/>Possible values inclue "PristineResources", "MajorResources", "CommonResources", "LowResources", and "DepletedResources".
/// </summary>

View File

@ -11,11 +11,11 @@ public class SellExplorationData : JournalBase
/// <summary>
/// List of systems for which data was sold.
/// </summary>
public ICollection<string> Systems { get; init; }
public IList<string> Systems { get; init; }
/// <summary>
/// List of first discovered bodies.
/// </summary>
public ICollection<string> Discovered { get; init; }
public IList<string> Discovered { get; init; }
/// <summary>
/// Base value of sold data.
/// </summary>

View File

@ -24,5 +24,5 @@ public class CarrierJump : FSDJump
public StationService StationServices { get; init; }
public string StationEconomy { get; init; }
public string StationEconomy_Localised { get; init; }
public IReadOnlyCollection<StationEconomy> StationEconomies { get; init; }
public List<StationEconomy> StationEconomies { get; init; }
}

View File

@ -19,7 +19,7 @@ public class CarrierStats : JournalBase
public bool PendingDecommission { get; init; }
public CarrierSpaceUsage SpaceUsage { get; init; }
public ParameterTypes.CarrierFinance Finance { get; init; }
public IReadOnlyCollection<CarrierCrew> Crew { get; init; }
public IReadOnlyCollection<CarrierPack> ShipPacks { get; init; }
public IReadOnlyCollection<CarrierPack> ModulePacks { get; init; }
public List<CarrierCrew> Crew { get; init; }
public List<CarrierPack> ShipPacks { get; init; }
public List<CarrierPack> ModulePacks { get; init; }
}

View File

@ -6,6 +6,6 @@ namespace Observatory.Framework.Files.Journal.Odyssey;
public class BackpackChange : JournalBase
{
public override string Event => "BackpackChange";
public IReadOnlyCollection<BackpackItemChange> Added { get; init; }
public IReadOnlyCollection<BackpackItemChange> Removed { get; init; }
public List<BackpackItemChange> Added { get; init; }
public List<BackpackItemChange> Removed { get; init; }
}

View File

@ -6,8 +6,8 @@ namespace Observatory.Framework.Files.Journal.Odyssey;
public class BackpackMaterials : JournalBase
{
public override string Event => "BackpackMaterials";
public IReadOnlyCollection<BackpackItem> Items { get; init; }
public IReadOnlyCollection<BackpackItem> Components { get; init; }
public IReadOnlyCollection<BackpackItem> Consumables { get; init; }
public IReadOnlyCollection<BackpackItem> Data { get; init; }
public List<BackpackItem> Items { get; init; }
public List<BackpackItem> Components { get; init; }
public List<BackpackItem> Consumables { get; init; }
public List<BackpackItem> Data { get; init; }
}

View File

@ -15,5 +15,5 @@ public class BuyMicroResources : JournalBase
public int Price { get; init; }
public ulong MarketID { get; init; }
public int TotalCount { get; init; }
public IReadOnlyCollection<MicroResource> MicroResources { get; init; }
public List<MicroResource> MicroResources { get; init; }
}

View File

@ -6,6 +6,6 @@ namespace Observatory.Framework.Files.Journal.Odyssey;
public class CreateSuitLoadout : DeleteSuitLoadout
{
public override string Event => "CreateSuitLoadout";
public IReadOnlyCollection<SuitModule> Modules { get; init; }
public ICollection<string> SuitMods { get; init; }
public List<SuitModule> Modules { get; init; }
public IList<string> SuitMods { get; init; }
}

View File

@ -6,7 +6,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey;
public class SellMicroResources : JournalBase
{
public override string Event => "SellMicroResources";
public IReadOnlyCollection<MicroResource> MicroResources { get; init; }
public List<MicroResource> MicroResources { get; init; }
public int Price { get; init; }
public ulong MarketID { get; init; }
}

View File

@ -7,5 +7,5 @@ public class SellOrganicData : JournalBase
{
public override string Event => "SellOrganicData";
public ulong MarketID { get; init; }
public IReadOnlyCollection<BioData> BioData { get; init; }
public List<BioData> BioData { get; init; }
}

View File

@ -6,8 +6,8 @@ namespace Observatory.Framework.Files.Journal.Odyssey;
public class ShipLockerMaterials : JournalBase
{
public override string Event => "ShipLockerMaterials";
public IReadOnlyCollection<BackpackItem> Items { get; init; }
public IReadOnlyCollection<BackpackItem> Components { get; init; }
public IReadOnlyCollection<BackpackItem> Consumables { get; init; }
public IReadOnlyCollection<BackpackItem> Data { get; init; }
public List<BackpackItem> Items { get; init; }
public List<BackpackItem> Components { get; init; }
public List<BackpackItem> Consumables { get; init; }
public List<BackpackItem> Data { get; init; }
}

View File

@ -7,7 +7,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey;
public class TradeMicroResources : JournalBase
{
public override string Event => "TradeMicroResources";
public IReadOnlyCollection<MicroResource> Offered { get; init; }
public List<MicroResource> Offered { get; init; }
public string Received { get; init; }
[JsonConverter(typeof(JsonStringEnumConverter))]
public MicroCategory Category { get; init; }

View File

@ -6,5 +6,5 @@ namespace Observatory.Framework.Files.Journal.Odyssey;
public class TransferMicroResources : JournalBase
{
public override string Event => "TransferMicroResources";
public IReadOnlyCollection<MicroTransfer> Transfers { get; init; }
public List<MicroTransfer> Transfers { get; init; }
}

View File

@ -16,7 +16,7 @@ public class ApproachSettlement : JournalBase
public float Longitude { get; init; }
public int BodyID { get; init; }
public string BodyName { get; init; }
public IReadOnlyCollection<StationEconomy> StationEconomies { get; init; }
public List<StationEconomy> StationEconomies { get; init; }
public string StationEconomy { get; init; }
public string StationEconomy_Localised { get; init; }
public Faction StationFaction { get; init; }

View File

@ -6,5 +6,5 @@ namespace Observatory.Framework.Files.Journal.Other;
public class CargoTransfer : JournalBase
{
public override string Event => "CargoTransfer";
public IReadOnlyCollection<CargoTransferDetail> Transfers { get; init; }
public List<CargoTransferDetail> Transfers { get; init; }
}

View File

@ -6,7 +6,7 @@ namespace Observatory.Framework.Files.Journal.Other;
public class ProspectedAsteroid : JournalBase
{
public override string Event => "ProspectedAsteroid";
public IReadOnlyCollection<ProspectMaterial> Materials { get; init; }
public List<ProspectMaterial> Materials { get; init; }
public string Content { get; init; }
public string Content_Localised { get; init; }
public string MotherlodeMaterial { get; init; }

View File

@ -5,5 +5,5 @@ namespace Observatory.Framework.Files.Journal.Other;
public class RebootRepair : JournalBase
{
public override string Event => "RebootRepair";
public ICollection<string> Modules { get; init; }
public IList<string> Modules { get; init; }
}

View File

@ -11,5 +11,5 @@ public class Synthesis : JournalBase
public string Name { get; init; }
[JsonConverter(typeof(MaterialConverter))]
public IReadOnlyCollection<Material> Materials { get; init; }
public List<Material> Materials { get; init; }
}

View File

@ -5,5 +5,5 @@ namespace Observatory.Framework.Files.Journal.Other;
public class WingJoin : JournalBase
{
public override string Event => "WingJoin";
public ICollection<string> Others { get; init; }
public IList<string> Others { get; init; }
}

View File

@ -5,5 +5,5 @@ namespace Observatory.Framework.Files.Journal.Powerplay;
public class PowerplayVoucher : PowerplayJoin
{
public override string Event => "PowerplayVoucher";
public ICollection<string> Systems { get; init; }
public IList<string> Systems { get; init; }
}

View File

@ -8,5 +8,5 @@ public class Cargo : JournalBase
public override string Event => "Cargo";
public string Vessel { get; init; }
public int Count { get; init; }
public IReadOnlyCollection<CargoType> Inventory { get; init; }
public List<CargoType> Inventory { get; init; }
}

View File

@ -19,5 +19,5 @@ public class Loadout : JournalBase
public double MaxJumpRange { get; init; }
public ulong Rebuy { get; init; }
public bool Hot { get; init; }
public IReadOnlyCollection<Modules> Modules { get; init; }
public List<Modules> Modules { get; init; }
}

View File

@ -6,8 +6,8 @@ using ParameterTypes;
public class Materials : JournalBase
{
public override string Event => "Materials";
public virtual IReadOnlyCollection<Material> Raw { get; init; }
public virtual IReadOnlyCollection<Material> Manufactured { get; init; }
public virtual IReadOnlyCollection<Material> Encoded { get; init; }
public virtual List<Material> Raw { get; init; }
public virtual List<Material> Manufactured { get; init; }
public virtual List<Material> Encoded { get; init; }
}

View File

@ -6,7 +6,7 @@ namespace Observatory.Framework.Files.Journal.Startup;
public class Missions : JournalBase
{
public override string Event => "Missions";
public IReadOnlyCollection<Mission> Active { get; init; }
public IReadOnlyCollection<Mission> Failed { get; init; }
public IReadOnlyCollection<Mission> Complete { get; init; }
public List<Mission> Active { get; init; }
public List<Mission> Failed { get; init; }
public List<Mission> Complete { get; init; }
}

View File

@ -6,5 +6,5 @@ namespace Observatory.Framework.Files.Journal.StationServices;
public class CommunityGoal : JournalBase
{
public override string Event => "CommunityGoal";
public IReadOnlyCollection<CurrentGoal> CurrentGoals { get; init; }
public List<CurrentGoal> CurrentGoals { get; init; }
}

View File

@ -21,6 +21,6 @@ public class EngineerCraft : JournalBase
public float Quality { get; init; }
public string ApplyExperimentalEffect { get; init; }
[JsonConverter(typeof(MaterialConverter))]
public IReadOnlyCollection<Material> Ingredients { get; init; }
public IReadOnlyCollection<Modifier> Modifiers { get; init; }
public List<Material> Ingredients { get; init; }
public List<Modifier> Modifiers { get; init; }
}

View File

@ -15,7 +15,7 @@ public class EngineerProgress : JournalBase
[JsonConverter(typeof(JsonStringEnumConverter))]
public Progress? Progress { get; set; }
public IReadOnlyCollection<EngineerType> Engineers { get; set; }
public List<EngineerType> Engineers { get; set; }
}
//{ "timestamp":"2024-05-25T04:44:34Z", "event":"EngineerProgress",
//"Engineers":[

View File

@ -9,5 +9,5 @@ public class MassModuleStore : JournalBase
public ulong MarketID { get; init; }
public string Ship { get; init; }
public ulong ShipID { get; init; }
public IReadOnlyCollection<Item> Items { get; init; }
public List<Item> Items { get; init; }
}

View File

@ -23,9 +23,9 @@ public class MissionCompleted : JournalBase
[JsonConverter(typeof(StringIntConverter))]
public int Donation { get; init; }
public long Donated { get; init; }
public ICollection<string> PermitsAwarded { get; init; }
public IReadOnlyCollection<CommodityReward> CommodityReward { get; init; }
public IReadOnlyCollection<MaterialReward> MaterialsReward { get; init; }
public IList<string> PermitsAwarded { get; init; }
public List<CommodityReward> CommodityReward { get; init; }
public List<MaterialReward> MaterialsReward { get; init; }
public string DestinationSystem { get; init; }
public string DestinationStation { get; init; }
public string DestinationSettlement { get; init; }
@ -33,5 +33,5 @@ public class MissionCompleted : JournalBase
public string NewDestinationStation { get; init; }
public int KillCount { get; init; }
public string TargetFaction { get; init; }
public IReadOnlyCollection<FactionEffect> FactionEffects { get; init; }
public List<FactionEffect> FactionEffects { get; init; }
}

View File

@ -13,6 +13,6 @@ public class RedeemVoucher : JournalBase
public long Amount { get; init; }
public string Faction { get; init; }
public float BrokerPercentage { get; init; }
public IReadOnlyCollection<VoucherFaction> Factions { get; init; }
public List<VoucherFaction> Factions { get; init; }
}

View File

@ -7,5 +7,5 @@ public class Repair : JournalBase
public override string Event => "Repair";
public string Item { get; init; }
public int Cost { get; init; }
public ICollection<string> Items { get; init; }
public IList<string> Items { get; init; }
}

View File

@ -12,5 +12,5 @@ public class StoredModules : JournalBase
/// </summary>
public string StationName { get; init; }
public ulong MarketID { get; init; }
public IReadOnlyCollection<StoredItem> Items { get; init; }
public List<StoredItem> Items { get; init; }
}

View File

@ -12,6 +12,6 @@ public class StoredShips : JournalBase
/// </summary>
public string StationName { get; init; }
public string StarSystem { get; init; }
public IReadOnlyCollection<StoredShip> ShipsHere { get; init; }
public IReadOnlyCollection<StoredShip> ShipsRemote { get; init; }
public List<StoredShip> ShipsHere { get; init; }
public List<StoredShip> ShipsRemote { get; init; }
}

View File

@ -8,7 +8,7 @@ public class TechnologyBroker : JournalBase
public override string Event => "TechnologyBroker";
public string BrokerType { get; init; }
public ulong MarketID { get; init; }
public IReadOnlyCollection<ItemName> ItemsUnlocked { get; init; }
public IReadOnlyCollection<CommodityReward> Commodities { get; init; }
public IReadOnlyCollection<MaterialReward> Materials { get; init; }
public List<ItemName> ItemsUnlocked { get; init; }
public List<CommodityReward> Commodities { get; init; }
public List<MaterialReward> Materials { get; init; }
}

View File

@ -81,7 +81,7 @@ public class Docked : JournalBase
private get => StationEconomy_Localised;
init => StationEconomy_Localised = value;
}
public IReadOnlyCollection<StationEconomy> StationEconomies { get; init; }
public List<StationEconomy> StationEconomies { get; init; }
[Obsolete("StationState is a rundundant property. Use StationEconomy to potentially reduce unnecessary checks.")]
public string StationState { get; init; }

View File

@ -33,9 +33,9 @@ public class FSDJump : JournalBase
public string SystemSecurity_Localised { get; init; }
public long Population { get; init; }
public bool Wanted { get; init; }
public IReadOnlyCollection<SystemFaction> Factions { get; init; }
public IReadOnlyCollection<Conflict> Conflicts { get; init; }
public ICollection<string> Powers { get; init; }
public List<SystemFaction> Factions { get; init; }
public List<Conflict> Conflicts { get; init; }
public IList<string> Powers { get; init; }
public string PowerplayState { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }

View File

@ -30,10 +30,10 @@ public class Location : JournalBase
public string StationGovernment { get; init; }
public string StationGovernment_Localised { get; init; }
public string StationAllegiance { get; init; }
public ICollection<string> StationServices { get; init; }
public IList<string> StationServices { get; init; }
public string StationEconomy { get; init; }
public string StationEconomy_Localised { get; init; }
public IReadOnlyCollection<StationEconomy> StationEconomies { get; init; }
public List<StationEconomy> StationEconomies { get; init; }
public string StarSystem { get; init; }
public ulong SystemAddress { get; init; }
@ -53,13 +53,13 @@ public class Location : JournalBase
public string Body { get; init; }
public int BodyID { get; init; }
public string BodyType { get; init; }
public IReadOnlyCollection<DetailedFaction> Factions { get; init; }
public List<DetailedFaction> Factions { get; init; }
[JsonConverter(typeof(LegacyFactionConverter<DetailedFaction>))]
public DetailedFaction SystemFaction { get; init; }
public IReadOnlyCollection<Conflict> Conflicts { get; init; }
public ICollection<string> Powers { get; init; }
public List<Conflict> Conflicts { get; init; }
public IList<string> Powers { get; init; }
public string PowerplayState { get; init; }
public bool Taxi { get; init; }
public bool Multicrew { get; init; }