Implement Other state events
now emitted to websocket connections on connect
This commit is contained in:
parent
68eff73dbd
commit
7eae5e5ee6
58 changed files with 223 additions and 183 deletions
|
|
@ -13,17 +13,17 @@ public class BackpackFile : JournalBase
|
|||
/// <summary>
|
||||
/// List of all items carried.
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<BackpackItem> Items { get; init; }
|
||||
public List<BackpackItem> Items { get; init; }
|
||||
/// <summary>
|
||||
/// List of all components carried.
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<BackpackItem> Components { get; init; }
|
||||
public List<BackpackItem> Components { get; init; }
|
||||
/// <summary>
|
||||
/// List of player consumable items carried.
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<BackpackItem> Consumables { get; init; }
|
||||
public List<BackpackItem> Consumables { get; init; }
|
||||
/// <summary>
|
||||
/// List of all data currently stored by the player.
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<BackpackItem> Data { get; init; }
|
||||
public List<BackpackItem> Data { get; init; }
|
||||
}
|
||||
|
|
@ -21,5 +21,5 @@ public class CargoFile : JournalBase
|
|||
/// <summary>
|
||||
/// List of full cargo details.
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<CargoType> Inventory { get; init; }
|
||||
public List<CargoType> Inventory { get; init; }
|
||||
}
|
||||
|
|
@ -9,9 +9,9 @@ namespace Observatory.Framework.Files.Converters;
|
|||
/// The format used for materials changed from an object with a key for each material to an array of objects containing "name" and "percent".
|
||||
/// Need to handle both if we're going to read historical data. This reads the old format into a class reflecting the new structure.
|
||||
/// </summary>
|
||||
public class MaterialCompositionConverter : JsonConverter<IReadOnlyCollection<MaterialComposition>>
|
||||
public class MaterialCompositionConverter : JsonConverter<List<MaterialComposition>>
|
||||
{
|
||||
public override IReadOnlyCollection<MaterialComposition> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
public override List<MaterialComposition> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.StartObject)
|
||||
{
|
||||
|
|
@ -42,10 +42,10 @@ public class MaterialCompositionConverter : JsonConverter<IReadOnlyCollection<Ma
|
|||
return materialComposition;
|
||||
}
|
||||
|
||||
return JsonSerializer.Deserialize<IReadOnlyCollection<MaterialComposition>>(ref reader, options)!;
|
||||
return JsonSerializer.Deserialize<List<MaterialComposition>>(ref reader, options)!;
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, IReadOnlyCollection<MaterialComposition> value,
|
||||
public override void Write(Utf8JsonWriter writer, List<MaterialComposition> value,
|
||||
JsonSerializerOptions options)
|
||||
{
|
||||
JsonSerializer.Serialize(writer, value, options);
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ namespace Observatory.Framework.Files.Converters;
|
|||
/// The format used for materials changed from an object with a key for each material to an array of objects containing "name" and "percent".
|
||||
/// Need to handle both if we're going to read historical data. This reads the old format into a class reflecting the new structure.
|
||||
/// </summary>
|
||||
public class MaterialConverter : JsonConverter<IReadOnlyCollection<Material>>
|
||||
public class MaterialConverter : JsonConverter<List<Material>>
|
||||
{
|
||||
public override IReadOnlyCollection<Material> Read(ref Utf8JsonReader reader, Type typeToConvert,
|
||||
public override List<Material> Read(ref Utf8JsonReader reader, Type typeToConvert,
|
||||
JsonSerializerOptions options)
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.StartObject)
|
||||
|
|
@ -44,10 +44,10 @@ public class MaterialConverter : JsonConverter<IReadOnlyCollection<Material>>
|
|||
return materialComposition;
|
||||
}
|
||||
|
||||
return JsonSerializer.Deserialize<IReadOnlyCollection<Material>>(ref reader, options)!;
|
||||
return JsonSerializer.Deserialize<List<Material>>(ref reader, options)!;
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, IReadOnlyCollection<Material> value, JsonSerializerOptions options)
|
||||
public override void Write(Utf8JsonWriter writer, List<Material> value, JsonSerializerOptions options)
|
||||
{
|
||||
JsonSerializer.Serialize(writer, value, options);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ public class FCMaterialsFile : JournalBase
|
|||
/// <summary>
|
||||
/// List of items in stock and in demand from the carrier bartender.
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<FCMaterial> Items { get; init; }
|
||||
public List<FCMaterial> Items { get; init; }
|
||||
}
|
||||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -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; }
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue