diff --git a/ObservatoryFramework/Files/BackPackFile.cs b/ObservatoryFramework/Files/BackPackFile.cs index 79a83c7..d2bde67 100644 --- a/ObservatoryFramework/Files/BackPackFile.cs +++ b/ObservatoryFramework/Files/BackPackFile.cs @@ -9,6 +9,7 @@ namespace Observatory.Framework.Files; /// public class BackpackFile : JournalBase { + public override string Event => "Backpack"; /// /// List of all items carried. /// diff --git a/ObservatoryFramework/Files/CargoFile.cs b/ObservatoryFramework/Files/CargoFile.cs index 545efea..e5b0db2 100644 --- a/ObservatoryFramework/Files/CargoFile.cs +++ b/ObservatoryFramework/Files/CargoFile.cs @@ -9,6 +9,7 @@ namespace Observatory.Framework.Files; /// public class CargoFile : JournalBase { + public override string Event => "Cargo"; /// /// Type of vehicle currently being reported. "Ship" or "SRV". /// diff --git a/ObservatoryFramework/Files/FCMaterialsFile.cs b/ObservatoryFramework/Files/FCMaterialsFile.cs index d413d74..de8b70b 100644 --- a/ObservatoryFramework/Files/FCMaterialsFile.cs +++ b/ObservatoryFramework/Files/FCMaterialsFile.cs @@ -9,6 +9,7 @@ namespace Observatory.Framework.Files; /// public class FCMaterialsFile : JournalBase { + public override string Event => "FCMaterials"; /// /// List of items in stock and in demand from the carrier bartender. /// diff --git a/ObservatoryFramework/Files/Journal/Combat/Bounty.cs b/ObservatoryFramework/Files/Journal/Combat/Bounty.cs index 14113e3..3f6f593 100644 --- a/ObservatoryFramework/Files/Journal/Combat/Bounty.cs +++ b/ObservatoryFramework/Files/Journal/Combat/Bounty.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Combat; public class Bounty : JournalBase { + public override string Event => "Bounty"; public ImmutableList Rewards { get; init; } public string PilotName { get; set; } public string PilotName_Localised { get; set; } diff --git a/ObservatoryFramework/Files/Journal/Combat/CapShipBound.cs b/ObservatoryFramework/Files/Journal/Combat/CapShipBond.cs similarity index 68% rename from ObservatoryFramework/Files/Journal/Combat/CapShipBound.cs rename to ObservatoryFramework/Files/Journal/Combat/CapShipBond.cs index 221a482..5157fce 100644 --- a/ObservatoryFramework/Files/Journal/Combat/CapShipBound.cs +++ b/ObservatoryFramework/Files/Journal/Combat/CapShipBond.cs @@ -1,7 +1,8 @@ namespace Observatory.Framework.Files.Journal.Combat; -public class CapShipBound : JournalBase +public class CapShipBond : JournalBase { + public override string Event => "CapShipBond"; public long Reward { get; init; } public string AwardingFaction { get; init; } public string VictimFaction { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Combat/Died.cs b/ObservatoryFramework/Files/Journal/Combat/Died.cs index 4e437df..b1f32cf 100644 --- a/ObservatoryFramework/Files/Journal/Combat/Died.cs +++ b/ObservatoryFramework/Files/Journal/Combat/Died.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Combat; public class Died : JournalBase { + public override string Event => "Died"; public string KillerName { get; init; } public string KillerName_Localised { get; init; } public string KillerShip { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Combat/EscapeInterdiction.cs b/ObservatoryFramework/Files/Journal/Combat/EscapeInterdiction.cs index d1e643d..3717dea 100644 --- a/ObservatoryFramework/Files/Journal/Combat/EscapeInterdiction.cs +++ b/ObservatoryFramework/Files/Journal/Combat/EscapeInterdiction.cs @@ -2,6 +2,7 @@ public class EscapeInterdiction : JournalBase { + public override string Event => "EscapeInterdiction"; public string Interdictor { get; init; } public bool IsPlayer { get; init; } public bool IsThargoid { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Combat/FactionKillBond.cs b/ObservatoryFramework/Files/Journal/Combat/FactionKillBond.cs index 3625d30..cdff1f8 100644 --- a/ObservatoryFramework/Files/Journal/Combat/FactionKillBond.cs +++ b/ObservatoryFramework/Files/Journal/Combat/FactionKillBond.cs @@ -2,6 +2,7 @@ public class FactionKillBond : JournalBase { + public override string Event => "FactionKillBond"; public long Reward { get; init; } public string AwardingFaction { get; init; } public string AwardingFaction_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Combat/FighterDestroyed.cs b/ObservatoryFramework/Files/Journal/Combat/FighterDestroyed.cs index 3996076..c29fbdd 100644 --- a/ObservatoryFramework/Files/Journal/Combat/FighterDestroyed.cs +++ b/ObservatoryFramework/Files/Journal/Combat/FighterDestroyed.cs @@ -2,5 +2,6 @@ public class FighterDestroyed : JournalBase { + public override string Event => "FighterDestroyed"; public ulong ID { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Combat/HeatDamage.cs b/ObservatoryFramework/Files/Journal/Combat/HeatDamage.cs index b954b31..5a0afe4 100644 --- a/ObservatoryFramework/Files/Journal/Combat/HeatDamage.cs +++ b/ObservatoryFramework/Files/Journal/Combat/HeatDamage.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Combat; public class HeatDamage : JournalBase -{ } \ No newline at end of file +{ + public override string Event => "HeatDamage"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Combat/HeatWarning.cs b/ObservatoryFramework/Files/Journal/Combat/HeatWarning.cs index 499e795..1d17da8 100644 --- a/ObservatoryFramework/Files/Journal/Combat/HeatWarning.cs +++ b/ObservatoryFramework/Files/Journal/Combat/HeatWarning.cs @@ -2,4 +2,5 @@ public class HeatWarning : JournalBase { + public override string Event => "HeatWarning"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Combat/HullDamage.cs b/ObservatoryFramework/Files/Journal/Combat/HullDamage.cs index f612f3a..8b8b6d5 100644 --- a/ObservatoryFramework/Files/Journal/Combat/HullDamage.cs +++ b/ObservatoryFramework/Files/Journal/Combat/HullDamage.cs @@ -2,6 +2,7 @@ public class HullDamage : JournalBase { + public override string Event => "HullDamage"; public float Health { get; init; } public bool PlayerPilot { get; init; } public bool Fighter { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Combat/Interdicted.cs b/ObservatoryFramework/Files/Journal/Combat/Interdicted.cs index e589bad..0d66499 100644 --- a/ObservatoryFramework/Files/Journal/Combat/Interdicted.cs +++ b/ObservatoryFramework/Files/Journal/Combat/Interdicted.cs @@ -2,6 +2,7 @@ public class Interdicted : JournalBase { + public override string Event => "Interdicted"; public bool Submitted { get; init; } public string Interdictor { get; init; } public string Interdictor_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Combat/Interdiction.cs b/ObservatoryFramework/Files/Journal/Combat/Interdiction.cs index 8fd0e7f..94680ac 100644 --- a/ObservatoryFramework/Files/Journal/Combat/Interdiction.cs +++ b/ObservatoryFramework/Files/Journal/Combat/Interdiction.cs @@ -2,6 +2,7 @@ public class Interdiction : JournalBase { + public override string Event => "Interdiction"; public bool Success { get; init; } public string Interdictor { get; init; } public bool IsPlayer { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Combat/PVPKill.cs b/ObservatoryFramework/Files/Journal/Combat/PVPKill.cs index a165049..ebaeebd 100644 --- a/ObservatoryFramework/Files/Journal/Combat/PVPKill.cs +++ b/ObservatoryFramework/Files/Journal/Combat/PVPKill.cs @@ -2,6 +2,7 @@ public class PVPKill : JournalBase { + public override string Event => "PVPKill"; public string Victim { get; init; } public int CombatRank { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Combat/SRVDestroyed.cs b/ObservatoryFramework/Files/Journal/Combat/SRVDestroyed.cs index 95dee65..1fe910e 100644 --- a/ObservatoryFramework/Files/Journal/Combat/SRVDestroyed.cs +++ b/ObservatoryFramework/Files/Journal/Combat/SRVDestroyed.cs @@ -2,6 +2,7 @@ public class SRVDestroyed : JournalBase { + public override string Event => "SRVDestroyed"; public string SRVType { get; init; } public string SRVType_Localised { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Combat/ShieldState.cs b/ObservatoryFramework/Files/Journal/Combat/ShieldState.cs index 846bfeb..392cd7a 100644 --- a/ObservatoryFramework/Files/Journal/Combat/ShieldState.cs +++ b/ObservatoryFramework/Files/Journal/Combat/ShieldState.cs @@ -2,5 +2,6 @@ public class ShieldState : JournalBase { + public override string Event => "ShieldState"; public bool ShieldsUp { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Combat/ShipTargeted.cs b/ObservatoryFramework/Files/Journal/Combat/ShipTargeted.cs index 155dc46..baaebe2 100644 --- a/ObservatoryFramework/Files/Journal/Combat/ShipTargeted.cs +++ b/ObservatoryFramework/Files/Journal/Combat/ShipTargeted.cs @@ -2,6 +2,7 @@ public class ShipTargeted : JournalBase { + public override string Event => "ShipTargeted"; public bool TargetLocked { get; init; } public string Ship { get; init; } public string Ship_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Combat/UnderAttack.cs b/ObservatoryFramework/Files/Journal/Combat/UnderAttack.cs index 9fc6b69..573512c 100644 --- a/ObservatoryFramework/Files/Journal/Combat/UnderAttack.cs +++ b/ObservatoryFramework/Files/Journal/Combat/UnderAttack.cs @@ -2,5 +2,6 @@ public class UnderAttack : JournalBase { + public override string Event => "UnderAttack"; public string Target { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Exploration/BuyExplorationData.cs b/ObservatoryFramework/Files/Journal/Exploration/BuyExplorationData.cs index b3db596..826fc82 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/BuyExplorationData.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/BuyExplorationData.cs @@ -5,6 +5,7 @@ /// public class BuyExplorationData : JournalBase { + public override string Event => "BuyExplorationData"; /// /// Name of the system for which data was purchased. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/CodexEntry.cs b/ObservatoryFramework/Files/Journal/Exploration/CodexEntry.cs index 9b2223f..a637f07 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/CodexEntry.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/CodexEntry.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.Exploration; /// public class CodexEntry : JournalBase { + public override string Event => "CodexEntry"; /// /// Unique ID of the entry. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/DiscoveryScan.cs b/ObservatoryFramework/Files/Journal/Exploration/DiscoveryScan.cs index e2cce51..c216d2f 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/DiscoveryScan.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/DiscoveryScan.cs @@ -5,6 +5,7 @@ /// public class DiscoveryScan : JournalBase { + public override string Event => "DiscoveryScan"; /// /// Unique ID of system. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/FSSAllBodiesFound.cs b/ObservatoryFramework/Files/Journal/Exploration/FSSAllBodiesFound.cs index 2892c47..ab55805 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/FSSAllBodiesFound.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/FSSAllBodiesFound.cs @@ -5,6 +5,8 @@ /// public class FSSAllBodiesFound : JournalBase { + public override string Event => "FSSAllBodiesFound"; + /// /// Name of the system. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/FSSBodySignals.cs b/ObservatoryFramework/Files/Journal/Exploration/FSSBodySignals.cs index 960ba17..529faaf 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/FSSBodySignals.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/FSSBodySignals.cs @@ -5,4 +5,5 @@ /// public class FSSBodySignals : SAASignalsFound { + public override string Event => "FSSBodySignals"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Exploration/FSSDiscoveryScan.cs b/ObservatoryFramework/Files/Journal/Exploration/FSSDiscoveryScan.cs index 6dbaa71..27814da 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/FSSDiscoveryScan.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/FSSDiscoveryScan.cs @@ -5,6 +5,7 @@ /// public class FSSDiscoveryScan : JournalBase { + public override string Event => "FSSDiscoveryScan"; /// /// Name of the current system. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/FSSSignalDiscovered.cs b/ObservatoryFramework/Files/Journal/Exploration/FSSSignalDiscovered.cs index 256504d..c674d82 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/FSSSignalDiscovered.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/FSSSignalDiscovered.cs @@ -5,6 +5,7 @@ /// public class FSSSignalDiscovered : JournalBase { + public override string Event => "FSSSignalDiscovered"; /// /// Name of the signal type. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/MaterialCollected.cs b/ObservatoryFramework/Files/Journal/Exploration/MaterialCollected.cs index c8cc5f1..c1052c5 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/MaterialCollected.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/MaterialCollected.cs @@ -5,6 +5,7 @@ /// public class MaterialCollected : JournalBase { + public override string Event => "MaterialCollected"; /// /// Category to which the material belongs. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/MaterialDiscarded.cs b/ObservatoryFramework/Files/Journal/Exploration/MaterialDiscarded.cs index 7c56cad..b9a29c5 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/MaterialDiscarded.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/MaterialDiscarded.cs @@ -5,4 +5,5 @@ /// public class MaterialDiscarded : MaterialCollected { + public override string Event => "MaterialDiscarded"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Exploration/MaterialDiscovered.cs b/ObservatoryFramework/Files/Journal/Exploration/MaterialDiscovered.cs index 22627ae..49dcaa0 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/MaterialDiscovered.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/MaterialDiscovered.cs @@ -5,6 +5,7 @@ /// public class MaterialDiscovered : JournalBase { + public override string Event => "MaterialDiscovered"; /// /// Category of the material. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/MultiSellExplorationData.cs b/ObservatoryFramework/Files/Journal/Exploration/MultiSellExplorationData.cs index 382fb92..f957a2c 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/MultiSellExplorationData.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/MultiSellExplorationData.cs @@ -8,6 +8,7 @@ namespace Observatory.Framework.Files.Journal.Exploration; /// public class MultiSellExplorationData : JournalBase { + public override string Event => "MultiSellExplorationData"; /// /// List of all sold first discoveries. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/NavBeaconScan.cs b/ObservatoryFramework/Files/Journal/Exploration/NavBeaconScan.cs index 6f62c72..d54aca7 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/NavBeaconScan.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/NavBeaconScan.cs @@ -5,6 +5,7 @@ /// public class NavBeaconScan : JournalBase { + public override string Event => "NavBeaconScan"; /// /// Number of bodies in system. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/SAAScanComplete.cs b/ObservatoryFramework/Files/Journal/Exploration/SAAScanComplete.cs index 1203405..9c475aa 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/SAAScanComplete.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/SAAScanComplete.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.Exploration; /// public class SAAScanComplete : JournalBase { + public override string Event => "SAAScanComplete"; /// /// Unique ID of current system. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/SAASignalsFound.cs b/ObservatoryFramework/Files/Journal/Exploration/SAASignalsFound.cs index 7970698..eade1fd 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/SAASignalsFound.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/SAASignalsFound.cs @@ -8,6 +8,7 @@ namespace Observatory.Framework.Files.Journal.Exploration; /// public class SAASignalsFound : JournalBase { + public override string Event => "SAASignalsFound"; /// /// Unique ID of current system. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/Scan.cs b/ObservatoryFramework/Files/Journal/Exploration/Scan.cs index 22969b4..d2480c1 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/Scan.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/Scan.cs @@ -10,6 +10,7 @@ namespace Observatory.Framework.Files.Journal.Exploration; /// public class Scan : ScanBaryCentre { + public override string Event => "Scan"; /// /// Type of scan which generated the event. Possible options include "Detailed", "AutoScan", and "NavBeaconDetail" (non-exhaustive). /// @@ -119,6 +120,7 @@ public class Scan : ScanBaryCentre /// /// Rotation period of body in seconds. /// + [JsonConverter(typeof(JournalInvalidFloatConverter))] public float RotationPeriod { get; init; } /// /// Axial tilt of body in radians. diff --git a/ObservatoryFramework/Files/Journal/Exploration/ScanBaryCentre.cs b/ObservatoryFramework/Files/Journal/Exploration/ScanBaryCentre.cs index 75f1e13..e31624a 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/ScanBaryCentre.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/ScanBaryCentre.cs @@ -5,6 +5,7 @@ /// public class ScanBaryCentre : JournalBase { + public override string Event => "ScanBaryCentre"; /// /// Name of star system containing scanned body. /// diff --git a/ObservatoryFramework/Files/Journal/Exploration/Screenshot.cs b/ObservatoryFramework/Files/Journal/Exploration/Screenshot.cs index 587119f..2112c39 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/Screenshot.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/Screenshot.cs @@ -5,6 +5,7 @@ /// public class Screenshot : JournalBase { + public override string Event => "Screenshot"; /// /// Filename of the screenshot taken in the form of "\\ED Pictures\\filename" /// "\\ED Pictures\\" corresponds to "%userprofile%\Pictures\Frontier Developments\Elite Dangerous\" diff --git a/ObservatoryFramework/Files/Journal/Exploration/SellExplorationData.cs b/ObservatoryFramework/Files/Journal/Exploration/SellExplorationData.cs index d5cf77d..27bc5f2 100644 --- a/ObservatoryFramework/Files/Journal/Exploration/SellExplorationData.cs +++ b/ObservatoryFramework/Files/Journal/Exploration/SellExplorationData.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.Exploration; /// public class SellExplorationData : JournalBase { + public override string Event => "SellExplorationData"; /// /// List of systems for which data was sold. /// diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierBankTransfer.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierBankTransfer.cs index 75f887a..c3e8665 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierBankTransfer.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierBankTransfer.cs @@ -2,6 +2,7 @@ public class CarrierBankTransfer : JournalBase { + public override string Event => "CarrierBankTransfer"; public ulong CarrierID { get; init; } public long Deposit { get; init; } public long Withdraw { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierBuy.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierBuy.cs index c1ca46f..fdb576a 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierBuy.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierBuy.cs @@ -2,6 +2,7 @@ public class CarrierBuy : JournalBase { + public override string Event => "CarrierBuy"; public long BoughtAtMarket { get; init; } public ulong SystemAddress { get; init; } public ulong CarrierID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierCancelDecommission.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierCancelDecommission.cs index be0f9fb..42f9796 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierCancelDecommission.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierCancelDecommission.cs @@ -2,5 +2,6 @@ public class CarrierCancelDecommission : JournalBase { + public override string Event => "CarrierCancelDecommission"; public ulong CarrierID { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierCrewServices.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierCrewServices.cs index 34d035a..d230fcc 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierCrewServices.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierCrewServices.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.FleetCarrier; public class CarrierCrewServices : JournalBase { + public override string Event => "CarrierCrewServices"; public ulong CarrierID { get; init; } public string CrewRole { get; init; } public string CrewName { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDecommission.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDecommission.cs index c78d1b1..b5788e6 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDecommission.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDecommission.cs @@ -2,8 +2,9 @@ public class CarrierDecommission : JournalBase { + public override string Event => "CarrierDecommission"; public ulong CarrierID { get; init; } public long ScrapRefund { get; init; } public long ScrapTime { get; init; } - public DateTime ScrapTimeUTC => DateTimeOffset.FromUnixTimeSeconds(ScrapTime).UtcDateTime; + public DateTimeOffset ScrapTimeUTC => DateTimeOffset.FromUnixTimeSeconds(ScrapTime); } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDepositFuel.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDepositFuel.cs index 665bf92..125b8a9 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDepositFuel.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDepositFuel.cs @@ -2,6 +2,7 @@ public class CarrierDepositFuel : JournalBase { + public override string Event => "CarrierDepositFuel"; public ulong CarrierID { get; init; } public int Amount { get; init; } public int Total { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDockingPermission.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDockingPermission.cs index 1cac93e..51f824a 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDockingPermission.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierDockingPermission.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.FleetCarrier; public class CarrierDockingPermission : JournalBase { + public override string Event => "CarrierDockingPermission"; public ulong CarrierID { get; init; } [JsonConverter(typeof(JsonStringEnumConverter))] public CarrierDockingAccess DockingAccess { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierFinance.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierFinance.cs index c544700..4946c6b 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierFinance.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierFinance.cs @@ -2,6 +2,7 @@ public class CarrierFinance : JournalBase { + public override string Event => "CarrierFinance"; public ulong CarrierID { get; init; } public int TaxRate { get; init; } public long CarrierBalance { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJump.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJump.cs index 0b6abad..c7621ae 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJump.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJump.cs @@ -8,6 +8,7 @@ namespace Observatory.Framework.Files.Journal.FleetCarrier; public class CarrierJump : FSDJump { + public override string Event => "CarrierJump"; public bool Docked { get; init; } public bool OnFoot { get; init; } /// diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJumpCancelled.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJumpCancelled.cs index e1d3cae..73bfcc8 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJumpCancelled.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJumpCancelled.cs @@ -2,5 +2,6 @@ public class CarrierJumpCancelled : JournalBase { + public override string Event => "CarrierJumpCancelled"; public ulong CarrierID { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJumpRequest.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJumpRequest.cs index c107492..b529699 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJumpRequest.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierJumpRequest.cs @@ -2,6 +2,7 @@ public class CarrierJumpRequest : JournalBase { + public override string Event => "CarrierJumpRequest"; public string Body { get; init; } public int BodyID { get; init; } public ulong SystemAddress { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierModulePack.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierModulePack.cs index 4312b73..67142c1 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierModulePack.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierModulePack.cs @@ -2,4 +2,5 @@ public class CarrierModulePack : CarrierShipPack { + public override string Event => "CarrierModulePack"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierShipPack.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierShipPack.cs index 80880fe..69cc6d1 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierShipPack.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierShipPack.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.FleetCarrier; public class CarrierShipPack : JournalBase { + public override string Event => "CarrierShipPack"; public ulong CarrierID { get; init; } [JsonConverter(typeof(JsonStringEnumConverter))] public CarrierOperation Operation { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierStats.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierStats.cs index b5685cb..bbec47b 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierStats.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierStats.cs @@ -6,6 +6,7 @@ namespace Observatory.Framework.Files.Journal.FleetCarrier; public class CarrierStats : JournalBase { + public override string Event => "CarrierStats"; public ulong CarrierID { get; init; } public string Callsign { get; init; } public string Name { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierTradeOrder.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierTradeOrder.cs index b75d252..998117f 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierTradeOrder.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/CarrierTradeOrder.cs @@ -2,6 +2,7 @@ public class CarrierTradeOrder : JournalBase { + public override string Event => "CarrierTradeOrder"; public ulong CarrierID { get; init; } public bool BlackMarket { get; init; } public string Commodity { get; init; } diff --git a/ObservatoryFramework/Files/Journal/FleetCarrier/FCMaterials.cs b/ObservatoryFramework/Files/Journal/FleetCarrier/FCMaterials.cs index 12c817c..015d9e2 100644 --- a/ObservatoryFramework/Files/Journal/FleetCarrier/FCMaterials.cs +++ b/ObservatoryFramework/Files/Journal/FleetCarrier/FCMaterials.cs @@ -2,8 +2,9 @@ namespace Observatory.Framework.Files.Journal.FleetCarrier; -public class FCMaterlas : FSDJump +public class FCMaterials : FSDJump { + public override string Event => "FCMaterials"; public ulong MarketID { get; init; } public string CarrierName { get; init; } public ulong CarrierID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/InvalidJson.cs b/ObservatoryFramework/Files/Journal/InvalidJson.cs deleted file mode 100644 index 68ab46b..0000000 --- a/ObservatoryFramework/Files/Journal/InvalidJson.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Observatory.Framework.Files.Journal; - -public class InvalidJson : JournalBase -{ - public string OriginalEvent { get; init; } -} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/JournalBase.cs b/ObservatoryFramework/Files/Journal/JournalBase.cs index 1e821d2..b494cf9 100644 --- a/ObservatoryFramework/Files/Journal/JournalBase.cs +++ b/ObservatoryFramework/Files/Journal/JournalBase.cs @@ -1,4 +1,8 @@ -namespace Observatory.Framework.Files.Journal; +using System.ComponentModel.DataAnnotations.Schema; +using System.Runtime.Serialization; +using DateTimeOffset = System.DateTimeOffset; + +namespace Observatory.Framework.Files.Journal; using System.Text.Json.Serialization; using Combat; @@ -15,7 +19,7 @@ using Travel; [JsonPolymorphic(TypeDiscriminatorPropertyName = "event", UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FailSerialization)] [JsonDerivedType(typeof(Bounty), "Bounty")] -[JsonDerivedType(typeof(CapShipBound), "CapShipBound")] +[JsonDerivedType(typeof(CapShipBond), "CapShipBound")] [JsonDerivedType(typeof(Died), "Died")] [JsonDerivedType(typeof(EscapeInterdiction), "EscapeInterdiction")] [JsonDerivedType(typeof(FactionKillBond), "FactionKillBond")] @@ -63,8 +67,7 @@ using Travel; [JsonDerivedType(typeof(CarrierShipPack), "CarrierShipPack")] [JsonDerivedType(typeof(CarrierStats), "CarrierStats")] [JsonDerivedType(typeof(CarrierTradeOrder), "CarrierTradeOrder")] -[JsonDerivedType(typeof(FCMaterlas), "FCMaterlas")] -[JsonDerivedType(typeof(InvalidJson), "InvalidJson")] +[JsonDerivedType(typeof(FleetCarrier.FCMaterials), "FCMaterlas")] [JsonDerivedType(typeof(BackpackChange), "BackpackChange")] [JsonDerivedType(typeof(BackpackMaterials), "Backpack")] [JsonDerivedType(typeof(BookDropship), "BookDropship")] @@ -81,7 +84,7 @@ using Travel; [JsonDerivedType(typeof(DropItems), "DropItems")] [JsonDerivedType(typeof(DropShipDeploy), "DropShipDeploy")] [JsonDerivedType(typeof(Embark), "Embark")] -[JsonDerivedType(typeof(FCMaterials), "FCMaterials")] +[JsonDerivedType(typeof(Odyssey.FCMaterials), "FCMaterials")] [JsonDerivedType(typeof(LoadoutEquipModule), "LoadoutEquipModule")] [JsonDerivedType(typeof(LoadoutRemoveModule), "LoadoutRemoveModule")] [JsonDerivedType(typeof(RenameSuitLoadout), "RenameSuitLoadout")] @@ -273,8 +276,16 @@ public abstract class JournalBase { [JsonPropertyName("timestamp")] public DateTimeOffset Timestamp { get; init; } + + /// + /// As this is used for the JsonPolymorphic attribute, this will not be deserilized. + /// + [JsonPropertyName("event")] + public abstract string Event { get; } [JsonExtensionData] + [IgnoreDataMember] + [NotMapped] public Dictionary AdditionalProperties { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/BackPack.cs b/ObservatoryFramework/Files/Journal/Odyssey/BackPack.cs index 4861b04..e1044ba 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/BackPack.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/BackPack.cs @@ -2,5 +2,5 @@ public class BackPack : JournalBase { - + public override string Event => "BackPack"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/BackpackChange.cs b/ObservatoryFramework/Files/Journal/Odyssey/BackpackChange.cs index cb9e92a..ed48c01 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/BackpackChange.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/BackpackChange.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class BackpackChange : JournalBase { + public override string Event => "BackpackChange"; public ImmutableList Added { get; init; } public ImmutableList Removed { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/BackpackMaterials.cs b/ObservatoryFramework/Files/Journal/Odyssey/BackpackMaterials.cs index 8170e63..26b27e3 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/BackpackMaterials.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/BackpackMaterials.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class BackpackMaterials : JournalBase { + public override string Event => "BackpackMaterials"; public ImmutableList Items { get; init; } public ImmutableList Components { get; init; } public ImmutableList Consumables { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/BookDropship.cs b/ObservatoryFramework/Files/Journal/Odyssey/BookDropship.cs index 0c6ba74..a12a51f 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/BookDropship.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/BookDropship.cs @@ -2,4 +2,5 @@ public class BookDropship : BookTaxi { + public override string Event => "BookDropship"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/BookTaxi.cs b/ObservatoryFramework/Files/Journal/Odyssey/BookTaxi.cs index 0dc113f..87c8c18 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/BookTaxi.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/BookTaxi.cs @@ -2,6 +2,7 @@ public class BookTaxi : JournalBase { + public override string Event => "BookTaxi"; public int Cost { get; init; } public string DestinationSystem { get; init; } public string DestinationLocation { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/BuyMicroResources.cs b/ObservatoryFramework/Files/Journal/Odyssey/BuyMicroResources.cs index d42da1e..67476e0 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/BuyMicroResources.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/BuyMicroResources.cs @@ -6,6 +6,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class BuyMicroResources : JournalBase { + public override string Event => "BuyMicroResources"; public string Name { get; init; } public string Name_Localised { get; init; } [JsonConverter(typeof(JsonStringEnumConverter))] diff --git a/ObservatoryFramework/Files/Journal/Odyssey/BuySuit.cs b/ObservatoryFramework/Files/Journal/Odyssey/BuySuit.cs index d354598..74df278 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/BuySuit.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/BuySuit.cs @@ -2,6 +2,7 @@ public class BuySuit : JournalBase { + public override string Event => "BuySuit"; public string Name { get; init; } public string Name_Localised { get; init; } public int Price { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/BuyWeapon.cs b/ObservatoryFramework/Files/Journal/Odyssey/BuyWeapon.cs index d11b85f..788ec57 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/BuyWeapon.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/BuyWeapon.cs @@ -2,6 +2,7 @@ public class BuyWeapon : JournalBase { + public override string Event => "BuyWeapon"; public string Name { get; init; } public string Name_Localised { get; init; } public int Price { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/CancelDropship.cs b/ObservatoryFramework/Files/Journal/Odyssey/CancelDropship.cs index 2323302..551715b 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/CancelDropship.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/CancelDropship.cs @@ -2,4 +2,5 @@ public class CancelDropship : CancelTaxi { + public override string Event => "CancelDropship"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/CancelTaxi.cs b/ObservatoryFramework/Files/Journal/Odyssey/CancelTaxi.cs index 6cef8de..9974906 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/CancelTaxi.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/CancelTaxi.cs @@ -2,5 +2,6 @@ public class CancelTaxi : JournalBase { + public override string Event => "CancelTaxi"; public int Refund { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/CollectItems.cs b/ObservatoryFramework/Files/Journal/Odyssey/CollectItems.cs index ae43307..3b35220 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/CollectItems.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/CollectItems.cs @@ -2,6 +2,7 @@ public class CollectItems : JournalBase { + public override string Event => "CollectItems"; public string Name { get; init; } public string Name_Localised { get; init; } public string Type { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/CreateSuitLoadout.cs b/ObservatoryFramework/Files/Journal/Odyssey/CreateSuitLoadout.cs index 04a3212..11be02f 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/CreateSuitLoadout.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/CreateSuitLoadout.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class CreateSuitLoadout : DeleteSuitLoadout { + public override string Event => "CreateSuitLoadout"; public ImmutableList Modules { get; init; } public ImmutableList SuitMods { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/DeleteSuitLoadout.cs b/ObservatoryFramework/Files/Journal/Odyssey/DeleteSuitLoadout.cs index 8eb3970..a5e0a9f 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/DeleteSuitLoadout.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/DeleteSuitLoadout.cs @@ -2,6 +2,7 @@ public class DeleteSuitLoadout : JournalBase { + public override string Event => "DeleteSuitLoadout"; public ulong SuitID { get; init; } public string SuitName { get; init; } public string SuitName_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/Disembark.cs b/ObservatoryFramework/Files/Journal/Odyssey/Disembark.cs index 490fb6d..64208f2 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/Disembark.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/Disembark.cs @@ -2,6 +2,7 @@ public class Disembark : JournalBase { + public override string Event => "Disembark"; public bool SRV { get; init; } public bool Taxi { get; init; } public bool Multicrew { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/DropItems.cs b/ObservatoryFramework/Files/Journal/Odyssey/DropItems.cs index ea53a3e..1200769 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/DropItems.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/DropItems.cs @@ -2,4 +2,5 @@ public class DropItems : CollectItems { + public override string Event => "DropItems"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/DropShipDeploy.cs b/ObservatoryFramework/Files/Journal/Odyssey/DropShipDeploy.cs index 8d9e632..3978aa3 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/DropShipDeploy.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/DropShipDeploy.cs @@ -2,6 +2,7 @@ public class DropShipDeploy : JournalBase { + public override string Event => "DropShipDeploy"; public string StarSystem { get; init; } public ulong SystemAddress { get; init; } public string Body { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/Embark.cs b/ObservatoryFramework/Files/Journal/Odyssey/Embark.cs index ab55df3..26575e4 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/Embark.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/Embark.cs @@ -2,4 +2,5 @@ public class Embark : Disembark { + public override string Event => "Embark"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/FCMaterials.cs b/ObservatoryFramework/Files/Journal/Odyssey/FCMaterials.cs index 796dd6f..8bbffca 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/FCMaterials.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/FCMaterials.cs @@ -2,6 +2,7 @@ public class FCMaterials : JournalBase { + public override string Event => "FCMaterials"; public ulong MarketID { get; init; } public string CarrierName { get; init; } public string CarrierID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/LoadoutEquipModule.cs b/ObservatoryFramework/Files/Journal/Odyssey/LoadoutEquipModule.cs index c2e3c34..ab7be83 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/LoadoutEquipModule.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/LoadoutEquipModule.cs @@ -2,6 +2,7 @@ public class LoadoutEquipModule : JournalBase { + public override string Event => "LoadoutEquipModule"; public ulong SuitID { get; init; } public string SuitName { get; init; } public string SuitName_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/LoadoutRemoveModule.cs b/ObservatoryFramework/Files/Journal/Odyssey/LoadoutRemoveModule.cs index 00f55f0..9f9b3d9 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/LoadoutRemoveModule.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/LoadoutRemoveModule.cs @@ -2,4 +2,5 @@ public class LoadoutRemoveModule : LoadoutEquipModule { + public override string Event => "LoadoutRemoveModule"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/RenameSuitLoadout.cs b/ObservatoryFramework/Files/Journal/Odyssey/RenameSuitLoadout.cs index f18631b..72eed54 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/RenameSuitLoadout.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/RenameSuitLoadout.cs @@ -2,6 +2,7 @@ public class RenameSuitLoadout : JournalBase { + public override string Event => "RenameSuitLoadout"; public ulong SuitID { get; init; } public string SuitName { get; init; } public ulong LoadoutID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/ScanOrganic.cs b/ObservatoryFramework/Files/Journal/Odyssey/ScanOrganic.cs index 4d2585b..a0efd83 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/ScanOrganic.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/ScanOrganic.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class ScanOrganic : JournalBase { + public override string Event => "ScanOrganic"; [JsonConverter(typeof(JsonStringEnumConverter))] public ScanOrganicType ScanType { get; init; } public string Genus { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/SellMicroResources.cs b/ObservatoryFramework/Files/Journal/Odyssey/SellMicroResources.cs index f2437e4..4a677c1 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/SellMicroResources.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/SellMicroResources.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class SellMicroResources : JournalBase { + public override string Event => "SellMicroResources"; public ImmutableList MicroResources { get; init; } public int Price { get; init; } public ulong MarketID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/SellOrganicData.cs b/ObservatoryFramework/Files/Journal/Odyssey/SellOrganicData.cs index b6f05d1..9abfbc9 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/SellOrganicData.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/SellOrganicData.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class SellOrganicData : JournalBase { + public override string Event => "SellOrganicData"; public ulong MarketID { get; init; } public ImmutableList BioData { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/SellSuit.cs b/ObservatoryFramework/Files/Journal/Odyssey/SellSuit.cs index 3a98b1a..80ef29b 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/SellSuit.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/SellSuit.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class SellSuit : BuySuit -{ } \ No newline at end of file +{ + public override string Event => "SellSuit"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/SellWeapon.cs b/ObservatoryFramework/Files/Journal/Odyssey/SellWeapon.cs index 4fc8048..7b07bab 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/SellWeapon.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/SellWeapon.cs @@ -2,4 +2,5 @@ public class SellWeapon : BuyWeapon { + public override string Event => "SellWeapon"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/ShipLockerMaterials.cs b/ObservatoryFramework/Files/Journal/Odyssey/ShipLockerMaterials.cs index fb3b4eb..4613b16 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/ShipLockerMaterials.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/ShipLockerMaterials.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class ShipLockerMaterials : JournalBase { + public override string Event => "ShipLockerMaterials"; public ImmutableList Items { get; init; } public ImmutableList Components { get; init; } public ImmutableList Consumables { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/SuitLoadout.cs b/ObservatoryFramework/Files/Journal/Odyssey/SuitLoadout.cs index 5a6c773..60e5438 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/SuitLoadout.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/SuitLoadout.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class SuitLoadout : CreateSuitLoadout -{ } \ No newline at end of file +{ + public override string Event => "SuitLoadout"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/SwitchSuitLoadout.cs b/ObservatoryFramework/Files/Journal/Odyssey/SwitchSuitLoadout.cs index 16d0dc9..eb9de25 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/SwitchSuitLoadout.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/SwitchSuitLoadout.cs @@ -2,4 +2,5 @@ public class SwitchSuitLoadout : CreateSuitLoadout { + public override string Event => "SwitchSuitLoadout"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/TradeMicroResources.cs b/ObservatoryFramework/Files/Journal/Odyssey/TradeMicroResources.cs index ddeb802..f47abac 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/TradeMicroResources.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/TradeMicroResources.cs @@ -6,6 +6,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class TradeMicroResources : JournalBase { + public override string Event => "TradeMicroResources"; public ImmutableList Offered { get; init; } public string Received { get; init; } [JsonConverter(typeof(JsonStringEnumConverter))] diff --git a/ObservatoryFramework/Files/Journal/Odyssey/TransferMicroResources.cs b/ObservatoryFramework/Files/Journal/Odyssey/TransferMicroResources.cs index 20ae5b0..9b2ab33 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/TransferMicroResources.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/TransferMicroResources.cs @@ -5,5 +5,6 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class TransferMicroResources : JournalBase { + public override string Event => "TransferMicroResources"; public ImmutableList Transfers { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Odyssey/UpgradeSuit.cs b/ObservatoryFramework/Files/Journal/Odyssey/UpgradeSuit.cs index 3f50e72..dd8d4ef 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/UpgradeSuit.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/UpgradeSuit.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.Odyssey; public class UpgradeSuit : JournalBase { + public override string Event => "UpgradeSuit"; public string Name { get; init; } public string Name_Localised { get; init; } public ulong SuitID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/UpgradeWeapon.cs b/ObservatoryFramework/Files/Journal/Odyssey/UpgradeWeapon.cs index fd37629..c3d58de 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/UpgradeWeapon.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/UpgradeWeapon.cs @@ -2,6 +2,7 @@ public class UpgradeWeapon : JournalBase { + public override string Event => "UpgradeWeapon"; public string Name { get; init; } public string Name_Localised { get; init; } public ulong SuitModuleID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Odyssey/UseConsumable.cs b/ObservatoryFramework/Files/Journal/Odyssey/UseConsumable.cs index 42df641..72c0a0c 100644 --- a/ObservatoryFramework/Files/Journal/Odyssey/UseConsumable.cs +++ b/ObservatoryFramework/Files/Journal/Odyssey/UseConsumable.cs @@ -2,6 +2,7 @@ public class UseConsumable : JournalBase { + public override string Event => "UseConsumable"; public string Name { get; init; } public string Name_Localised { get; init; } public string Type { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/AfmuRepairs.cs b/ObservatoryFramework/Files/Journal/Other/AfmuRepairs.cs index 3620cc8..5d3fa3d 100644 --- a/ObservatoryFramework/Files/Journal/Other/AfmuRepairs.cs +++ b/ObservatoryFramework/Files/Journal/Other/AfmuRepairs.cs @@ -2,6 +2,7 @@ public class AfmuRepairs : JournalBase { + public override string Event => "AfmuRepairs"; public string Module { get; init; } public string Module_Localised { get; init; } public bool FullyRepaired { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/ApproachSettlement.cs b/ObservatoryFramework/Files/Journal/Other/ApproachSettlement.cs index e938c33..17b5ab9 100644 --- a/ObservatoryFramework/Files/Journal/Other/ApproachSettlement.cs +++ b/ObservatoryFramework/Files/Journal/Other/ApproachSettlement.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class ApproachSettlement : JournalBase { + public override string Event => "ApproachSettlement"; public ulong SystemAddress { get; init; } public string Name { get; init; } public string Name_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/CargoTransfer.cs b/ObservatoryFramework/Files/Journal/Other/CargoTransfer.cs index 0153f5e..7705314 100644 --- a/ObservatoryFramework/Files/Journal/Other/CargoTransfer.cs +++ b/ObservatoryFramework/Files/Journal/Other/CargoTransfer.cs @@ -5,5 +5,6 @@ namespace Observatory.Framework.Files.Journal.Other; public class CargoTransfer : JournalBase { + public override string Event => "CargoTransfer"; public ImmutableList Transfers { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/ChangeCrewRole.cs b/ObservatoryFramework/Files/Journal/Other/ChangeCrewRole.cs index 264bec6..164215c 100644 --- a/ObservatoryFramework/Files/Journal/Other/ChangeCrewRole.cs +++ b/ObservatoryFramework/Files/Journal/Other/ChangeCrewRole.cs @@ -2,6 +2,7 @@ public class ChangeCrewRole : JournalBase { + public override string Event => "ChangeCrewRole"; public string Role { get; init; } public bool Telepresence { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/CockpitBreached.cs b/ObservatoryFramework/Files/Journal/Other/CockpitBreached.cs index 8e0e272..49f13c1 100644 --- a/ObservatoryFramework/Files/Journal/Other/CockpitBreached.cs +++ b/ObservatoryFramework/Files/Journal/Other/CockpitBreached.cs @@ -2,4 +2,5 @@ public class CockpitBreached : JournalBase { + public override string Event => "CockpitBreached"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/CommitCrime.cs b/ObservatoryFramework/Files/Journal/Other/CommitCrime.cs index 37af577..2b63c04 100644 --- a/ObservatoryFramework/Files/Journal/Other/CommitCrime.cs +++ b/ObservatoryFramework/Files/Journal/Other/CommitCrime.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class CommitCrime : JournalBase { + public override string Event => "CommitCrime"; [JsonConverter(typeof(JsonStringEnumConverter))] public CrimeType CrimeType { get; init; } public string Faction { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/Continued.cs b/ObservatoryFramework/Files/Journal/Other/Continued.cs index 5d3c59c..36d099f 100644 --- a/ObservatoryFramework/Files/Journal/Other/Continued.cs +++ b/ObservatoryFramework/Files/Journal/Other/Continued.cs @@ -2,5 +2,6 @@ public class Continued : JournalBase { + public override string Event => "Continued"; public int Part { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/CrewLaunchFighter.cs b/ObservatoryFramework/Files/Journal/Other/CrewLaunchFighter.cs index 1cad5fa..01954c9 100644 --- a/ObservatoryFramework/Files/Journal/Other/CrewLaunchFighter.cs +++ b/ObservatoryFramework/Files/Journal/Other/CrewLaunchFighter.cs @@ -2,5 +2,6 @@ public class CrewLaunchFighter : CrewMemberJoins { + public override string Event => "CrewLaunchFighter"; public ulong ID { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/CrewMemberJoins.cs b/ObservatoryFramework/Files/Journal/Other/CrewMemberJoins.cs index 808269f..c905b50 100644 --- a/ObservatoryFramework/Files/Journal/Other/CrewMemberJoins.cs +++ b/ObservatoryFramework/Files/Journal/Other/CrewMemberJoins.cs @@ -2,6 +2,7 @@ public class CrewMemberJoins : JournalBase { + public override string Event => "CrewMemberJoins"; public string Crew { get; init; } public bool Telepresence { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/CrewMemberQuits.cs b/ObservatoryFramework/Files/Journal/Other/CrewMemberQuits.cs index ebdba7a..e92a7de 100644 --- a/ObservatoryFramework/Files/Journal/Other/CrewMemberQuits.cs +++ b/ObservatoryFramework/Files/Journal/Other/CrewMemberQuits.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Other; public class CrewMemberQuits : CrewMemberJoins -{ } \ No newline at end of file +{ + public override string Event => "CrewMemberQuits"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/CrewMemberRoleChange.cs b/ObservatoryFramework/Files/Journal/Other/CrewMemberRoleChange.cs index 8ccc540..ee09af3 100644 --- a/ObservatoryFramework/Files/Journal/Other/CrewMemberRoleChange.cs +++ b/ObservatoryFramework/Files/Journal/Other/CrewMemberRoleChange.cs @@ -2,5 +2,6 @@ public class CrewMemberRoleChange : CrewMemberJoins { + public override string Event => "CrewMemberRoleChange"; public string Role { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/CrimeVictim.cs b/ObservatoryFramework/Files/Journal/Other/CrimeVictim.cs index 112f74c..4501fbe 100644 --- a/ObservatoryFramework/Files/Journal/Other/CrimeVictim.cs +++ b/ObservatoryFramework/Files/Journal/Other/CrimeVictim.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class CrimeVictim : JournalBase { + public override string Event => "CrimeVictim"; public string Offender { get; init; } [JsonConverter(typeof(JsonStringEnumConverter))] public CrimeType CrimeType { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/DataScanned.cs b/ObservatoryFramework/Files/Journal/Other/DataScanned.cs index 10c6531..66e4d7c 100644 --- a/ObservatoryFramework/Files/Journal/Other/DataScanned.cs +++ b/ObservatoryFramework/Files/Journal/Other/DataScanned.cs @@ -2,6 +2,7 @@ public class DataScanned : JournalBase { + public override string Event => "DataScanned"; public string Type { get; init; } public string Type_Localised { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/DatalinkScan.cs b/ObservatoryFramework/Files/Journal/Other/DatalinkScan.cs index 2c14d0c..32acd87 100644 --- a/ObservatoryFramework/Files/Journal/Other/DatalinkScan.cs +++ b/ObservatoryFramework/Files/Journal/Other/DatalinkScan.cs @@ -2,6 +2,7 @@ public class DatalinkScan : JournalBase { + public override string Event => "DatalinkScan"; public string Message { get; init; } public string Message_Localised { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/DatalinkVoucher.cs b/ObservatoryFramework/Files/Journal/Other/DatalinkVoucher.cs index 724d3a8..43afb73 100644 --- a/ObservatoryFramework/Files/Journal/Other/DatalinkVoucher.cs +++ b/ObservatoryFramework/Files/Journal/Other/DatalinkVoucher.cs @@ -2,6 +2,7 @@ public class DatalinkVoucher : JournalBase { + public override string Event => "DatalinkVoucher"; public int Reward { get; init; } public string VictimFaction { get; init; } public string PayeeFaction { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/DockFighter.cs b/ObservatoryFramework/Files/Journal/Other/DockFighter.cs index af641a5..30e4d72 100644 --- a/ObservatoryFramework/Files/Journal/Other/DockFighter.cs +++ b/ObservatoryFramework/Files/Journal/Other/DockFighter.cs @@ -2,5 +2,6 @@ public class DockFighter : JournalBase { + public override string Event => "DockFighter"; public ulong ID { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/DockSRV.cs b/ObservatoryFramework/Files/Journal/Other/DockSRV.cs index bfb02a8..19c5e97 100644 --- a/ObservatoryFramework/Files/Journal/Other/DockSRV.cs +++ b/ObservatoryFramework/Files/Journal/Other/DockSRV.cs @@ -2,6 +2,7 @@ public class DockSRV : DockFighter { + public override string Event => "DockSRV"; public string SRVType { get; init; } public string SRVType_Localised { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/EndCrewSession.cs b/ObservatoryFramework/Files/Journal/Other/EndCrewSession.cs index 339cf7a..ac4d0f4 100644 --- a/ObservatoryFramework/Files/Journal/Other/EndCrewSession.cs +++ b/ObservatoryFramework/Files/Journal/Other/EndCrewSession.cs @@ -2,6 +2,7 @@ public class EndCrewSession : JournalBase { + public override string Event => "EndCrewSession"; public bool OnCrime { get; init; } public bool Telepresence { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/FighterRebuilt.cs b/ObservatoryFramework/Files/Journal/Other/FighterRebuilt.cs index 607e337..7f6b943 100644 --- a/ObservatoryFramework/Files/Journal/Other/FighterRebuilt.cs +++ b/ObservatoryFramework/Files/Journal/Other/FighterRebuilt.cs @@ -2,6 +2,7 @@ public class FighterRebuilt : JournalBase { + public override string Event => "FighterRebuilt"; public string Loadout { get; init; } public ulong ID { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/Friends.cs b/ObservatoryFramework/Files/Journal/Other/Friends.cs index 19430da..97a1de0 100644 --- a/ObservatoryFramework/Files/Journal/Other/Friends.cs +++ b/ObservatoryFramework/Files/Journal/Other/Friends.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class Friends : JournalBase { + public override string Event => "Friends"; [JsonConverter(typeof(JsonStringEnumConverter))] public FriendStatus Status { get; init; } public string Name { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/FuelScoop.cs b/ObservatoryFramework/Files/Journal/Other/FuelScoop.cs index 5d0ff82..56b4dcb 100644 --- a/ObservatoryFramework/Files/Journal/Other/FuelScoop.cs +++ b/ObservatoryFramework/Files/Journal/Other/FuelScoop.cs @@ -2,6 +2,7 @@ public class FuelScoop : JournalBase { + public override string Event => "FuelScoop"; public float Scooped { get; init; } public float Total { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/JetConeBoost.cs b/ObservatoryFramework/Files/Journal/Other/JetConeBoost.cs index 62a1ca9..73a4449 100644 --- a/ObservatoryFramework/Files/Journal/Other/JetConeBoost.cs +++ b/ObservatoryFramework/Files/Journal/Other/JetConeBoost.cs @@ -2,5 +2,6 @@ public class JetConeBoost : JournalBase { + public override string Event => "JetConeBoost"; public float BoostValue { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/JetConeDamage.cs b/ObservatoryFramework/Files/Journal/Other/JetConeDamage.cs index 9326d1c..fb6ba5c 100644 --- a/ObservatoryFramework/Files/Journal/Other/JetConeDamage.cs +++ b/ObservatoryFramework/Files/Journal/Other/JetConeDamage.cs @@ -2,5 +2,6 @@ public class JetConeDamage : JournalBase { + public override string Event => "JetConeDamage"; public string Module { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/JoinACrew.cs b/ObservatoryFramework/Files/Journal/Other/JoinACrew.cs index 14ad7ec..69796d6 100644 --- a/ObservatoryFramework/Files/Journal/Other/JoinACrew.cs +++ b/ObservatoryFramework/Files/Journal/Other/JoinACrew.cs @@ -2,6 +2,7 @@ public class JoinACrew : JournalBase { + public override string Event => "JoinACrew"; public string Captain { get; init; } public bool Telepresence { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/KickCrewMember.cs b/ObservatoryFramework/Files/Journal/Other/KickCrewMember.cs index 7fda29b..dd65ffd 100644 --- a/ObservatoryFramework/Files/Journal/Other/KickCrewMember.cs +++ b/ObservatoryFramework/Files/Journal/Other/KickCrewMember.cs @@ -2,6 +2,7 @@ public class KickCrewMember : JournalBase { + public override string Event => "KickCrewMember"; public string Crew { get; init; } public bool OnCrime { get; init; } public bool Telepresence { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/LaunchDrone.cs b/ObservatoryFramework/Files/Journal/Other/LaunchDrone.cs index dc17223..af5b636 100644 --- a/ObservatoryFramework/Files/Journal/Other/LaunchDrone.cs +++ b/ObservatoryFramework/Files/Journal/Other/LaunchDrone.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class LaunchDrone : JournalBase { + public override string Event => "LaunchDrone"; [JsonConverter(typeof(JsonStringEnumConverter))] public LimpetDrone Type { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/LaunchFighter.cs b/ObservatoryFramework/Files/Journal/Other/LaunchFighter.cs index f06e388..bd867c1 100644 --- a/ObservatoryFramework/Files/Journal/Other/LaunchFighter.cs +++ b/ObservatoryFramework/Files/Journal/Other/LaunchFighter.cs @@ -2,4 +2,5 @@ public class LaunchFighter : LaunchSRV { + public override string Event => "LaunchFighter"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/LaunchSRV.cs b/ObservatoryFramework/Files/Journal/Other/LaunchSRV.cs index ef1fa93..4879058 100644 --- a/ObservatoryFramework/Files/Journal/Other/LaunchSRV.cs +++ b/ObservatoryFramework/Files/Journal/Other/LaunchSRV.cs @@ -2,6 +2,7 @@ public class LaunchSRV : JournalBase { + public override string Event => "LaunchSRV"; public string Loadout { get; init; } public ulong ID { get; init; } public bool PlayerControlled { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/ModuleInfo.cs b/ObservatoryFramework/Files/Journal/Other/ModuleInfo.cs index f34b6cc..9bd4dcf 100644 --- a/ObservatoryFramework/Files/Journal/Other/ModuleInfo.cs +++ b/ObservatoryFramework/Files/Journal/Other/ModuleInfo.cs @@ -2,5 +2,5 @@ public class ModuleInfo : JournalBase { - + public override string Event => "ModuleInfo"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/Music.cs b/ObservatoryFramework/Files/Journal/Other/Music.cs index f656682..2ce14b4 100644 --- a/ObservatoryFramework/Files/Journal/Other/Music.cs +++ b/ObservatoryFramework/Files/Journal/Other/Music.cs @@ -2,5 +2,6 @@ public class Music : JournalBase { + public override string Event => "Music"; public string MusicTrack { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/NpcCrewPaidWage.cs b/ObservatoryFramework/Files/Journal/Other/NpcCrewPaidWage.cs index 654effb..31bdc39 100644 --- a/ObservatoryFramework/Files/Journal/Other/NpcCrewPaidWage.cs +++ b/ObservatoryFramework/Files/Journal/Other/NpcCrewPaidWage.cs @@ -2,6 +2,7 @@ public class NpcCrewPaidWage : JournalBase { + public override string Event => "NpcCrewPaidWage"; public ulong NpcCrewId { get; init; } public string NpcCrewName { get; init; } public int Amount { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/NpcCrewRank.cs b/ObservatoryFramework/Files/Journal/Other/NpcCrewRank.cs index 9b80be6..be47f28 100644 --- a/ObservatoryFramework/Files/Journal/Other/NpcCrewRank.cs +++ b/ObservatoryFramework/Files/Journal/Other/NpcCrewRank.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class NpcCrewRank : JournalBase { + public override string Event => "NpcCrewRank"; public ulong NpcCrewId { get; init; } public string NpcCrewName { get; init; } public RankCombat RankCombat { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/Promotion.cs b/ObservatoryFramework/Files/Journal/Other/Promotion.cs index eb897e0..eeab956 100644 --- a/ObservatoryFramework/Files/Journal/Other/Promotion.cs +++ b/ObservatoryFramework/Files/Journal/Other/Promotion.cs @@ -3,4 +3,6 @@ namespace Observatory.Framework.Files.Journal.Other; public class Promotion : Rank -{ } \ No newline at end of file +{ + public override string Event => "Promotion"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/ProspectedAsteroid.cs b/ObservatoryFramework/Files/Journal/Other/ProspectedAsteroid.cs index 39ce9f2..9f1bb00 100644 --- a/ObservatoryFramework/Files/Journal/Other/ProspectedAsteroid.cs +++ b/ObservatoryFramework/Files/Journal/Other/ProspectedAsteroid.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class ProspectedAsteroid : JournalBase { + public override string Event => "ProspectedAsteroid"; public ImmutableList Materials { get; init; } public string Content { get; init; } public string Content_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/QuitACrew.cs b/ObservatoryFramework/Files/Journal/Other/QuitACrew.cs index 5de8633..ccdd57a 100644 --- a/ObservatoryFramework/Files/Journal/Other/QuitACrew.cs +++ b/ObservatoryFramework/Files/Journal/Other/QuitACrew.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Other; public class QuitACrew : JoinACrew -{ } \ No newline at end of file +{ + public override string Event => "QuitACrew"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/RebootRepair.cs b/ObservatoryFramework/Files/Journal/Other/RebootRepair.cs index 2cbc303..592e1fd 100644 --- a/ObservatoryFramework/Files/Journal/Other/RebootRepair.cs +++ b/ObservatoryFramework/Files/Journal/Other/RebootRepair.cs @@ -4,5 +4,6 @@ namespace Observatory.Framework.Files.Journal.Other; public class RebootRepair : JournalBase { + public override string Event => "RebootRepair"; public ImmutableList Modules { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/ReceiveText.cs b/ObservatoryFramework/Files/Journal/Other/ReceiveText.cs index 1dd97d2..30dca05 100644 --- a/ObservatoryFramework/Files/Journal/Other/ReceiveText.cs +++ b/ObservatoryFramework/Files/Journal/Other/ReceiveText.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class ReceiveText : JournalBase { + public override string Event => "ReceiveText"; public string From { get; init; } public string From_Localised { get; init; } public string Message { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/RepairDrone.cs b/ObservatoryFramework/Files/Journal/Other/RepairDrone.cs index 5b7dd32..c3bdf94 100644 --- a/ObservatoryFramework/Files/Journal/Other/RepairDrone.cs +++ b/ObservatoryFramework/Files/Journal/Other/RepairDrone.cs @@ -2,6 +2,7 @@ public class RepairDrone : JournalBase { + public override string Event => "RepairDrone"; public float HullRepaired { get; init; } public float CockpitRepaired { get; init; } public float CorrosionRepaired { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/ReservoirReplenished.cs b/ObservatoryFramework/Files/Journal/Other/ReservoirReplenished.cs index b6dba53..9c85c3c 100644 --- a/ObservatoryFramework/Files/Journal/Other/ReservoirReplenished.cs +++ b/ObservatoryFramework/Files/Journal/Other/ReservoirReplenished.cs @@ -2,6 +2,7 @@ public class ReservoirReplenished : JournalBase { + public override string Event => "ReservoirReplenished"; public float FuelMain { get; init; } public float FuelReservoir { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/Resurrect.cs b/ObservatoryFramework/Files/Journal/Other/Resurrect.cs index cc1775e..3e3f19d 100644 --- a/ObservatoryFramework/Files/Journal/Other/Resurrect.cs +++ b/ObservatoryFramework/Files/Journal/Other/Resurrect.cs @@ -2,6 +2,7 @@ public class Resurrect : JournalBase { + public override string Event => "Resurrect"; public string Option { get; init; } public int Cost { get; init; } public bool Bankrupt { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/Scanned.cs b/ObservatoryFramework/Files/Journal/Other/Scanned.cs index 610801d..59f6ba6 100644 --- a/ObservatoryFramework/Files/Journal/Other/Scanned.cs +++ b/ObservatoryFramework/Files/Journal/Other/Scanned.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class Scanned : JournalBase { + public override string Event => "Scanned"; [JsonConverter(typeof(JsonStringEnumConverter))] public ScanType ScanType { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/SelfDestruct.cs b/ObservatoryFramework/Files/Journal/Other/SelfDestruct.cs index a281ef0..941c555 100644 --- a/ObservatoryFramework/Files/Journal/Other/SelfDestruct.cs +++ b/ObservatoryFramework/Files/Journal/Other/SelfDestruct.cs @@ -2,4 +2,5 @@ public class SelfDestruct : JournalBase { + public override string Event => "SelfDestruct"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/SendText.cs b/ObservatoryFramework/Files/Journal/Other/SendText.cs index 5268487..8295e3a 100644 --- a/ObservatoryFramework/Files/Journal/Other/SendText.cs +++ b/ObservatoryFramework/Files/Journal/Other/SendText.cs @@ -2,6 +2,7 @@ public class SendText : JournalBase { + public override string Event => "SendText"; public string To { get; init; } public string To_Localised { get; init; } public string Message { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/Shutdown.cs b/ObservatoryFramework/Files/Journal/Other/Shutdown.cs index 75527f3..743b6b4 100644 --- a/ObservatoryFramework/Files/Journal/Other/Shutdown.cs +++ b/ObservatoryFramework/Files/Journal/Other/Shutdown.cs @@ -2,4 +2,5 @@ public class Shutdown : JournalBase { + public override string Event => "Shutdown"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/Synthesis.cs b/ObservatoryFramework/Files/Journal/Other/Synthesis.cs index a671e57..769f6f6 100644 --- a/ObservatoryFramework/Files/Journal/Other/Synthesis.cs +++ b/ObservatoryFramework/Files/Journal/Other/Synthesis.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class Synthesis : JournalBase { + public override string Event => "Synthesis"; public string Name { get; init; } [JsonConverter(typeof(MaterialConverter))] diff --git a/ObservatoryFramework/Files/Journal/Other/SystemsShutdown.cs b/ObservatoryFramework/Files/Journal/Other/SystemsShutdown.cs index ce7d5de..a3b2fa3 100644 --- a/ObservatoryFramework/Files/Journal/Other/SystemsShutdown.cs +++ b/ObservatoryFramework/Files/Journal/Other/SystemsShutdown.cs @@ -2,4 +2,5 @@ public class SystemsShutdown : JournalBase { + public override string Event => "SystemsShutdown"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/USSDrop.cs b/ObservatoryFramework/Files/Journal/Other/USSDrop.cs index 20d01e1..27c4c07 100644 --- a/ObservatoryFramework/Files/Journal/Other/USSDrop.cs +++ b/ObservatoryFramework/Files/Journal/Other/USSDrop.cs @@ -2,6 +2,7 @@ public class USSDrop : JournalBase { + public override string Event => "USSDrop"; public string USSType { get; init; } public string USSType_Localised { get; init; } public int USSThreat { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Other/VehicleSwitch.cs b/ObservatoryFramework/Files/Journal/Other/VehicleSwitch.cs index e723949..81051f7 100644 --- a/ObservatoryFramework/Files/Journal/Other/VehicleSwitch.cs +++ b/ObservatoryFramework/Files/Journal/Other/VehicleSwitch.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Other; public class VehicleSwitch : JournalBase { + public override string Event => "VehicleSwitch"; [JsonConverter(typeof(JsonStringEnumConverter))] public VehicleSwitchTo To { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/WingAdd.cs b/ObservatoryFramework/Files/Journal/Other/WingAdd.cs index c858954..e96df87 100644 --- a/ObservatoryFramework/Files/Journal/Other/WingAdd.cs +++ b/ObservatoryFramework/Files/Journal/Other/WingAdd.cs @@ -2,5 +2,6 @@ public class WingAdd : JournalBase { + public override string Event => "WingAdd"; public string Name { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/WingInvite.cs b/ObservatoryFramework/Files/Journal/Other/WingInvite.cs index 8ca7190..3eb60a2 100644 --- a/ObservatoryFramework/Files/Journal/Other/WingInvite.cs +++ b/ObservatoryFramework/Files/Journal/Other/WingInvite.cs @@ -2,4 +2,5 @@ public class WingInvite : WingAdd { + public override string Event => "WingInvite"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/WingJoin.cs b/ObservatoryFramework/Files/Journal/Other/WingJoin.cs index 99d145b..851e0b1 100644 --- a/ObservatoryFramework/Files/Journal/Other/WingJoin.cs +++ b/ObservatoryFramework/Files/Journal/Other/WingJoin.cs @@ -4,5 +4,6 @@ namespace Observatory.Framework.Files.Journal.Other; public class WingJoin : JournalBase { + public override string Event => "WingJoin"; public ImmutableList Others { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Other/WingLeave.cs b/ObservatoryFramework/Files/Journal/Other/WingLeave.cs index 7ed9273..b2478dc 100644 --- a/ObservatoryFramework/Files/Journal/Other/WingLeave.cs +++ b/ObservatoryFramework/Files/Journal/Other/WingLeave.cs @@ -2,4 +2,5 @@ public class WingLeave : JournalBase { + public override string Event => "WingLeave"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayCollect.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayCollect.cs index 91e9c73..a813044 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayCollect.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayCollect.cs @@ -2,6 +2,7 @@ public class PowerplayCollect : PowerplayJoin { + public override string Event => "PowerplayCollect"; public string Type { get; init; } public string Type_Localised { get; init; } public int Count { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayDefect.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayDefect.cs index 607525b..69e2604 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayDefect.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayDefect.cs @@ -2,6 +2,7 @@ public class PowerplayDefect : JournalBase { + public override string Event => "PowerplayDefect"; public string FromPower { get; init; } public string ToPower { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayDeliver.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayDeliver.cs index 4dcf491..fad0ab6 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayDeliver.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayDeliver.cs @@ -2,4 +2,5 @@ public class PowerplayDeliver : PowerplayCollect { + public override string Event => "PowerplayDeliver"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayFastTrack.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayFastTrack.cs index 9634afd..ff88a1d 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayFastTrack.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayFastTrack.cs @@ -2,5 +2,6 @@ public class PowerplayFastTrack : PowerplayJoin { + public override string Event => "PowerplayFastTrack"; public int Cost { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayJoin.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayJoin.cs index 961109a..da9d754 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayJoin.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayJoin.cs @@ -2,5 +2,6 @@ public class PowerplayJoin : JournalBase { + public override string Event => "PowerplayJoin"; public string Power { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayLeave.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayLeave.cs index 1bb18cd..3a62e5a 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayLeave.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayLeave.cs @@ -2,4 +2,5 @@ public class PowerplayLeave : PowerplayJoin { + public override string Event => "PowerplayLeave"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplaySalary.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplaySalary.cs index dd7a742..32289eb 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplaySalary.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplaySalary.cs @@ -2,5 +2,6 @@ public class PowerplaySalary : PowerplayJoin { + public override string Event => "PowerplaySalary"; public int Amount { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayVote.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayVote.cs index d5e9a90..ad904cc 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayVote.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayVote.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.Powerplay; public class PowerplayVote : PowerplayJoin { + public override string Event => "PowerplayVote"; public int Votes { get; init; } [JsonPropertyName("")] public int UnnamedValue { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayVoucher.cs b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayVoucher.cs index f8ab949..648b437 100644 --- a/ObservatoryFramework/Files/Journal/Powerplay/PowerplayVoucher.cs +++ b/ObservatoryFramework/Files/Journal/Powerplay/PowerplayVoucher.cs @@ -4,5 +4,6 @@ namespace Observatory.Framework.Files.Journal.Powerplay; public class PowerplayVoucher : PowerplayJoin { + public override string Event => "PowerplayVoucher"; public ImmutableList Systems { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/AppliedToSquadron.cs b/ObservatoryFramework/Files/Journal/Squadron/AppliedToSquadron.cs index 9aeae51..7729b63 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/AppliedToSquadron.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/AppliedToSquadron.cs @@ -2,4 +2,5 @@ public class AppliedToSquadron : SquadronCreated { + public override string Event => "AppliedToSquadron"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/DisbandedSquadron.cs b/ObservatoryFramework/Files/Journal/Squadron/DisbandedSquadron.cs index 517ffbd..3ff929d 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/DisbandedSquadron.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/DisbandedSquadron.cs @@ -2,4 +2,5 @@ public class DisbandedSquadron : SquadronCreated { + public override string Event => "DisbandedSquadron"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/InvitedToSquadron.cs b/ObservatoryFramework/Files/Journal/Squadron/InvitedToSquadron.cs index 27f384d..8274bbe 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/InvitedToSquadron.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/InvitedToSquadron.cs @@ -2,4 +2,5 @@ public class InvitedToSquadron : SquadronCreated { + public override string Event => "InvitedToSquadron"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/JoinedSquadron.cs b/ObservatoryFramework/Files/Journal/Squadron/JoinedSquadron.cs index 8308415..75966bb 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/JoinedSquadron.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/JoinedSquadron.cs @@ -2,4 +2,5 @@ public class JoinedSquadron : SquadronCreated { + public override string Event => "JoinedSquadron"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/KickedFromSquadron.cs b/ObservatoryFramework/Files/Journal/Squadron/KickedFromSquadron.cs index 20197c9..77c679f 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/KickedFromSquadron.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/KickedFromSquadron.cs @@ -2,4 +2,5 @@ public class KickedFromSquadron : SquadronCreated { + public override string Event => "KickedFromSquadron"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/LeftSquadron.cs b/ObservatoryFramework/Files/Journal/Squadron/LeftSquadron.cs index d56abdb..dd1130d 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/LeftSquadron.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/LeftSquadron.cs @@ -2,4 +2,5 @@ public class LeftSquadron : SquadronCreated { + public override string Event => "LeftSquadron"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/SharedBookmarkToSquadron.cs b/ObservatoryFramework/Files/Journal/Squadron/SharedBookmarkToSquadron.cs index 8207f66..488fc1e 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/SharedBookmarkToSquadron.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/SharedBookmarkToSquadron.cs @@ -2,4 +2,5 @@ public class SharedBookmarkToSquadron : SquadronCreated { + public override string Event => "SharedBookmarkToSquadron"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/SquadronCreated.cs b/ObservatoryFramework/Files/Journal/Squadron/SquadronCreated.cs index d3bcd78..38e4115 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/SquadronCreated.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/SquadronCreated.cs @@ -2,5 +2,6 @@ public class SquadronCreated : JournalBase { + public override string Event => "SquadronCreated"; public string SquadronName { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/SquadronDemotion.cs b/ObservatoryFramework/Files/Journal/Squadron/SquadronDemotion.cs index 8ab417c..73e8e93 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/SquadronDemotion.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/SquadronDemotion.cs @@ -2,6 +2,7 @@ public class SquadronDemotion : SquadronCreated { + public override string Event => "SquadronDemotion"; public int OldRank { get; init; } public int NewRank { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/SquadronPromotion.cs b/ObservatoryFramework/Files/Journal/Squadron/SquadronPromotion.cs index 2d9c907..44d25f4 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/SquadronPromotion.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/SquadronPromotion.cs @@ -2,4 +2,5 @@ public class SquadronPromotion : SquadronDemotion { + public override string Event => "SquadronPromotion"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/SquadronStartup.cs b/ObservatoryFramework/Files/Journal/Squadron/SquadronStartup.cs index c61bea5..b6ac150 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/SquadronStartup.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/SquadronStartup.cs @@ -2,5 +2,6 @@ public class SquadronStartup : SquadronCreated { + public override string Event => "SquadronStartup"; public int CurrentRank { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Squadron/WonATrophyForSquadron.cs b/ObservatoryFramework/Files/Journal/Squadron/WonATrophyForSquadron.cs index 9750663..dcc7f76 100644 --- a/ObservatoryFramework/Files/Journal/Squadron/WonATrophyForSquadron.cs +++ b/ObservatoryFramework/Files/Journal/Squadron/WonATrophyForSquadron.cs @@ -2,4 +2,5 @@ public class WonATrophyForSquadron : SquadronCreated { + } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Startup/Cargo.cs b/ObservatoryFramework/Files/Journal/Startup/Cargo.cs index 2edda7e..89d63cd 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Cargo.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Cargo.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Startup; public class Cargo : JournalBase { + public override string Event => "Cargo"; public string Vessel { get; init; } public int Count { get; init; } public ImmutableList Inventory { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/ClearSavedGame.cs b/ObservatoryFramework/Files/Journal/Startup/ClearSavedGame.cs index 1a23961..2174b13 100644 --- a/ObservatoryFramework/Files/Journal/Startup/ClearSavedGame.cs +++ b/ObservatoryFramework/Files/Journal/Startup/ClearSavedGame.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Startup; public class ClearSavedGame : Commander -{ } \ No newline at end of file +{ + public override string Event => "ClearSavedGame"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Startup/Commander.cs b/ObservatoryFramework/Files/Journal/Startup/Commander.cs index d83b63e..f19654b 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Commander.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Commander.cs @@ -2,6 +2,7 @@ public class Commander : JournalBase { + public override string Event => "Commander"; public string Name { get; init; } public string FID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/FileHeader.cs b/ObservatoryFramework/Files/Journal/Startup/FileHeader.cs index f5641bc..94bcd35 100644 --- a/ObservatoryFramework/Files/Journal/Startup/FileHeader.cs +++ b/ObservatoryFramework/Files/Journal/Startup/FileHeader.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.Startup; public class FileHeader : JournalBase { + public override string Event => "FileHeader"; [JsonPropertyName("part")] public int Part { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/LoadGame.cs b/ObservatoryFramework/Files/Journal/Startup/LoadGame.cs index 77b32c3..118d4a8 100644 --- a/ObservatoryFramework/Files/Journal/Startup/LoadGame.cs +++ b/ObservatoryFramework/Files/Journal/Startup/LoadGame.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.Startup; public class LoadGame : JournalBase { + public override string Event => "LoadGame"; public string Commander { get; init; } public string FID { get; init; } public bool Horizons { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/Loadout.cs b/ObservatoryFramework/Files/Journal/Startup/Loadout.cs index 7343148..d19d3e8 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Loadout.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Loadout.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Startup; public class Loadout : JournalBase { + public override string Event => "Loadout"; public string Ship { get; init; } public ulong ShipID { get; init; } public string ShipName { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/Materials.cs b/ObservatoryFramework/Files/Journal/Startup/Materials.cs index 25e4aa1..7cbf19d 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Materials.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Materials.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Startup; public class Materials : JournalBase { + public override string Event => "Materials"; public ImmutableList Raw { get; init; } public ImmutableList Manufactured { get; init; } public ImmutableList Encoded { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/Missions.cs b/ObservatoryFramework/Files/Journal/Startup/Missions.cs index 28c3641..d7b098c 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Missions.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Missions.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Startup; public class Missions : JournalBase { + public override string Event => "Missions"; public ImmutableList Active { get; init; } public ImmutableList Failed { get; init; } public ImmutableList Complete { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/NewCommander.cs b/ObservatoryFramework/Files/Journal/Startup/NewCommander.cs index b879238..f642847 100644 --- a/ObservatoryFramework/Files/Journal/Startup/NewCommander.cs +++ b/ObservatoryFramework/Files/Journal/Startup/NewCommander.cs @@ -2,5 +2,6 @@ public class NewCommander : Commander { + public override string Event => "NewCommander"; public string Package { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Startup/Passengers.cs b/ObservatoryFramework/Files/Journal/Startup/Passengers.cs index 16e19f8..a0b77df 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Passengers.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Passengers.cs @@ -4,6 +4,8 @@ namespace Observatory.Framework.Files.Journal.Startup; public class Passengers : JournalBase { + public override string Event => "Passengers"; + [JsonPropertyName("Passengers_Missions_Accepted")] public int PassengersMissionsAccepted { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/Powerplay.cs b/ObservatoryFramework/Files/Journal/Startup/Powerplay.cs index 74ad125..5b950e9 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Powerplay.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Powerplay.cs @@ -2,6 +2,8 @@ public class Powerplay : JournalBase { + public override string Event => "Powerplay"; + public string Power { get; init; } public int Rank { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/Progress.cs b/ObservatoryFramework/Files/Journal/Startup/Progress.cs index e52f349..bdf06fc 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Progress.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Progress.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Startup; public class Progress : Rank -{ } \ No newline at end of file +{ + public override string Event => "Progress"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Startup/Rank.cs b/ObservatoryFramework/Files/Journal/Startup/Rank.cs index 74bc0d1..733e2ed 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Rank.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Rank.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.Startup; public class Rank : JournalBase { + public override string Event => "Rank"; public RankCombat Combat { get; init; } public RankTrade Trade { get; init; } public RankExploration Explore { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/Reputation.cs b/ObservatoryFramework/Files/Journal/Startup/Reputation.cs index f5ba96f..1bcef84 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Reputation.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Reputation.cs @@ -2,6 +2,7 @@ public class Reputation : JournalBase { + public override string Event => "Reputation"; public float Empire { get; init; } public float Federation { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Startup/Statistics.cs b/ObservatoryFramework/Files/Journal/Startup/Statistics.cs index 850c63f..a621867 100644 --- a/ObservatoryFramework/Files/Journal/Startup/Statistics.cs +++ b/ObservatoryFramework/Files/Journal/Startup/Statistics.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Startup; public class Statistics : JournalBase { + public override string Event => "Statistics"; [JsonPropertyName("Bank_Account")] public BankAccount BankAccount { get; init; } public ParameterTypes.Combat Combat { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/BuyAmmo.cs b/ObservatoryFramework/Files/Journal/StationServices/BuyAmmo.cs index b0f3232..62962fd 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/BuyAmmo.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/BuyAmmo.cs @@ -2,5 +2,6 @@ public class BuyAmmo : JournalBase { + public override string Event => "BuyAmmo"; public int Cost { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/BuyDrones.cs b/ObservatoryFramework/Files/Journal/StationServices/BuyDrones.cs index 192044d..bb1d8b7 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/BuyDrones.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/BuyDrones.cs @@ -2,6 +2,7 @@ public class BuyDrones : JournalBase { + public override string Event => "BuyDrones"; public string Type { get; init; } public int Count { get; init; } public uint BuyPrice { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/CargoDepot.cs b/ObservatoryFramework/Files/Journal/StationServices/CargoDepot.cs index 894972e..22b7c95 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/CargoDepot.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/CargoDepot.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class CargoDepot : JournalBase { + public override string Event => "CargoDepot"; public ulong MissionID { get; init; } [JsonConverter(typeof(JsonStringEnumConverter))] public UpdateType UpdateType { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ClearImpound.cs b/ObservatoryFramework/Files/Journal/StationServices/ClearImpound.cs index 3c86121..5b98353 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ClearImpound.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ClearImpound.cs @@ -2,6 +2,7 @@ public class ClearImpound : JournalBase { + public override string Event => "ClearImpound"; public string ShipType { get; init; } public string ShipType_Localised { get; init; } public ulong ShipID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/CommunityGoal.cs b/ObservatoryFramework/Files/Journal/StationServices/CommunityGoal.cs index e1ac356..8d7ee6f 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/CommunityGoal.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/CommunityGoal.cs @@ -5,5 +5,6 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class CommunityGoal : JournalBase { + public override string Event => "CommunityGoal"; public ImmutableList CurrentGoals { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalDiscard.cs b/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalDiscard.cs index 18a51bb..98fd0f0 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalDiscard.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalDiscard.cs @@ -2,6 +2,7 @@ public class CommunityGoalDiscard : JournalBase { + public override string Event => "CommunityGoalDiscard"; public ulong CGID { get; init; } public string Name { get; init; } public string System { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalJoin.cs b/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalJoin.cs index 20fff43..bfe842e 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalJoin.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalJoin.cs @@ -2,4 +2,5 @@ public class CommunityGoalJoin : CommunityGoalDiscard { + public override string Event => "CommunityGoalJoin"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalReward.cs b/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalReward.cs index 0ba7932..fcb547e 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalReward.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/CommunityGoalReward.cs @@ -2,5 +2,6 @@ public class CommunityGoalReward : CommunityGoalDiscard { + public override string Event => "CommunityGoalReward"; public long Reward { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/CrewAssign.cs b/ObservatoryFramework/Files/Journal/StationServices/CrewAssign.cs index 06672aa..4d7879f 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/CrewAssign.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/CrewAssign.cs @@ -2,5 +2,6 @@ public class CrewAssign : CrewFire { + public override string Event => "CrewAssign"; public string Role { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/CrewFire.cs b/ObservatoryFramework/Files/Journal/StationServices/CrewFire.cs index 768ea1a..15593cf 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/CrewFire.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/CrewFire.cs @@ -2,6 +2,7 @@ public class CrewFire : JournalBase { + public override string Event => "CrewFire"; public string Name { get; init; } public ulong CrewID { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/CrewHire.cs b/ObservatoryFramework/Files/Journal/StationServices/CrewHire.cs index b1d6a00..0d18c6c 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/CrewHire.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/CrewHire.cs @@ -2,6 +2,7 @@ public class CrewHire : CrewFire { + public override string Event => "CrewHire"; public string Faction { get; init; } public long Cost { get; init; } public int CombatRank { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/EngineerApply.cs b/ObservatoryFramework/Files/Journal/StationServices/EngineerApply.cs index 598c3f9..3248140 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/EngineerApply.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/EngineerApply.cs @@ -3,6 +3,7 @@ [Obsolete("This event was removed in Elite Dangerous 3.0 and will only appear in legacy data.")] public class EngineerApply : JournalBase { + public override string Event => "EngineerApply"; public string Engineer { get; init; } public string Blueprint { get; init; } public int Level { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/EngineerContribution.cs b/ObservatoryFramework/Files/Journal/StationServices/EngineerContribution.cs index 39be644..68fe447 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/EngineerContribution.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/EngineerContribution.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class EngineerContribution : JournalBase { + public override string Event => "EngineerContribution"; public string Engineer { get; init; } public ulong EngineerID { get; init; } [JsonConverter(typeof(JsonStringEnumConverter))] diff --git a/ObservatoryFramework/Files/Journal/StationServices/EngineerCraft.cs b/ObservatoryFramework/Files/Journal/StationServices/EngineerCraft.cs index 068b77e..3c39147 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/EngineerCraft.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/EngineerCraft.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class EngineerCraft : JournalBase { + public override string Event => "EngineerCraft"; public string Engineer { get; init; } public ulong EngineerID { get; init; } public string Blueprint { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/EngineerLegacyConvert.cs b/ObservatoryFramework/Files/Journal/StationServices/EngineerLegacyConvert.cs index 021bbd1..e5447f1 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/EngineerLegacyConvert.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/EngineerLegacyConvert.cs @@ -2,5 +2,6 @@ public class EngineerLegacyConvert : EngineerCraft { + public override string Event => "EngineerLegacyConvert"; public bool IsPreview { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/EngineerProgress.cs b/ObservatoryFramework/Files/Journal/StationServices/EngineerProgress.cs index fdd6684..66236db 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/EngineerProgress.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/EngineerProgress.cs @@ -6,11 +6,14 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class EngineerProgress : JournalBase { + public override string Event => "EngineerProgress"; public string Engineer { get; init; } public ulong EngineerID { get; init; } public int Rank { get; init; } public int RankProgress { get; init; } + [JsonConverter(typeof(JsonStringEnumConverter))] - public ParameterTypes.Progress Progress { get; init; } + public Progress Progress { get; init; } + public ImmutableList Engineers { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/FetchRemoteModule.cs b/ObservatoryFramework/Files/Journal/StationServices/FetchRemoteModule.cs index d7ecfa5..1b51ec7 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/FetchRemoteModule.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/FetchRemoteModule.cs @@ -2,6 +2,7 @@ public class FetchRemoteModule : JournalBase { + public override string Event => "FetchRemoteModule"; public ulong ShipID { get; init; } public int StorageSlot { get; init; } public string StoredItem { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/Market.cs b/ObservatoryFramework/Files/Journal/StationServices/Market.cs index 1fb79ac..e4b7cf9 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/Market.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/Market.cs @@ -3,9 +3,9 @@ using Observatory.Framework.Files.ParameterTypes; namespace Observatory.Framework.Files.Journal.StationServices; -// TODO: Read market.json file - Will only be valid for most recent market event public class Market : JournalBase { + public override string Event => "Market"; public ulong MarketID { get; init; } /// /// Name of the station at which this event occurred. diff --git a/ObservatoryFramework/Files/Journal/StationServices/MassModuleStore.cs b/ObservatoryFramework/Files/Journal/StationServices/MassModuleStore.cs index 10d829d..c2d842c 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/MassModuleStore.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/MassModuleStore.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class MassModuleStore : JournalBase { + public override string Event => "MassModuleStore"; public ulong MarketID { get; init; } public string Ship { get; init; } public ulong ShipID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/MaterialTrade.cs b/ObservatoryFramework/Files/Journal/StationServices/MaterialTrade.cs index 06d98d0..ecc7c72 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/MaterialTrade.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/MaterialTrade.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class MaterialTrade : JournalBase { + public override string Event => "MaterialTrade"; public ulong MarketID { get; init; } public string TraderType { get; init; } public TradeDetail Paid { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/MissionAbandoned.cs b/ObservatoryFramework/Files/Journal/StationServices/MissionAbandoned.cs index a8d3e37..3f6f73e 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/MissionAbandoned.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/MissionAbandoned.cs @@ -2,6 +2,7 @@ public class MissionAbandoned : JournalBase { + public override string Event => "MissionAbandoned"; public string Name { get; init; } public ulong MissionID { get; init; } public long Fine { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/MissionAccepted.cs b/ObservatoryFramework/Files/Journal/StationServices/MissionAccepted.cs index 663b788..34ff1bd 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/MissionAccepted.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/MissionAccepted.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class MissionAccepted : JournalBase { + public override string Event => "MissionAccepted"; public string Name { get; init; } public string LocalisedName { get; init; } public string Faction { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/MissionCompleted.cs b/ObservatoryFramework/Files/Journal/StationServices/MissionCompleted.cs index 507c91d..af5a27d 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/MissionCompleted.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/MissionCompleted.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class MissionCompleted : JournalBase { + public override string Event => "MissionCompleted"; public string Name { get; init; } public string LocalisedName { get; init; } public string Faction { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/MissionFailed.cs b/ObservatoryFramework/Files/Journal/StationServices/MissionFailed.cs index 4dfd3bc..c4be059 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/MissionFailed.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/MissionFailed.cs @@ -2,6 +2,7 @@ public class MissionFailed : JournalBase { + public override string Event => "MissionFailed"; public string Name { get; init; } public string Name_Localised { get; init; } public ulong MissionID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/MissionRedirected.cs b/ObservatoryFramework/Files/Journal/StationServices/MissionRedirected.cs index cea7b61..7833a8c 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/MissionRedirected.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/MissionRedirected.cs @@ -2,6 +2,7 @@ public class MissionRedirected : JournalBase { + public override string Event => "MissionRedirected"; public string Name { get; init; } public string Name_Localised { get; init; } public ulong MissionID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ModuleBuy.cs b/ObservatoryFramework/Files/Journal/StationServices/ModuleBuy.cs index e8a2f79..8074745 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ModuleBuy.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ModuleBuy.cs @@ -2,6 +2,7 @@ public class ModuleBuy : JournalBase { + public override string Event => "ModuleBuy"; public ulong MarketID { get; init; } public string Slot { get; init; } public string BuyItem { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ModuleRetrieve.cs b/ObservatoryFramework/Files/Journal/StationServices/ModuleRetrieve.cs index 61988ae..9e6073e 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ModuleRetrieve.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ModuleRetrieve.cs @@ -2,6 +2,7 @@ public class ModuleRetrieve : JournalBase { + public override string Event => "ModuleRetrieve"; public ulong MarketID { get; init; } public string Slot { get; init; } public string Ship { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ModuleSell.cs b/ObservatoryFramework/Files/Journal/StationServices/ModuleSell.cs index 7930124..39422fa 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ModuleSell.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ModuleSell.cs @@ -2,6 +2,7 @@ public class ModuleSell : JournalBase { + public override string Event => "ModuleSell"; public ulong MarketID { get; init; } public string Slot { get; init; } public string SellItem { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ModuleSellRemote.cs b/ObservatoryFramework/Files/Journal/StationServices/ModuleSellRemote.cs index cd7b655..6592841 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ModuleSellRemote.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ModuleSellRemote.cs @@ -2,6 +2,7 @@ public class ModuleSellRemote : JournalBase { + public override string Event => "ModuleSellRemote"; public int StorageSlot { get; init; } public string SellItem { get; init; } public string SellItem_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ModuleStore.cs b/ObservatoryFramework/Files/Journal/StationServices/ModuleStore.cs index 8007406..a640f73 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ModuleStore.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ModuleStore.cs @@ -2,6 +2,7 @@ public class ModuleStore : JournalBase { + public override string Event => "ModuleStore"; public ulong MarketID { get; init; } public string Slot { get; init; } public string Ship { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ModuleSwap.cs b/ObservatoryFramework/Files/Journal/StationServices/ModuleSwap.cs index 16f02cb..dfd7ba0 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ModuleSwap.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ModuleSwap.cs @@ -2,6 +2,7 @@ public class ModuleSwap : JournalBase { + public override string Event => "ModuleSwap"; public ulong MarketID { get; init; } public string FromSlot { get; init; } public string ToSlot { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/Outfitting.cs b/ObservatoryFramework/Files/Journal/StationServices/Outfitting.cs index 56b6ff2..1dbb3b1 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/Outfitting.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/Outfitting.cs @@ -2,6 +2,7 @@ public class Outfitting : JournalBase { + public override string Event => "Outfitting"; public ulong MarketID { get; init; } /// /// Name of the station at which this event occurred. diff --git a/ObservatoryFramework/Files/Journal/StationServices/PayBounties.cs b/ObservatoryFramework/Files/Journal/StationServices/PayBounties.cs index 913c54f..3845699 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/PayBounties.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/PayBounties.cs @@ -2,6 +2,7 @@ public class PayBounties : JournalBase { + public override string Event => "PayBounties"; public long Amount { get; init; } public float BrokerPercentage { get; init; } public bool AllFines { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/PayFines.cs b/ObservatoryFramework/Files/Journal/StationServices/PayFines.cs index 1c271d7..c531397 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/PayFines.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/PayFines.cs @@ -2,4 +2,5 @@ public class PayFines : PayBounties { + public override string Event => "PayFines"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/PayLegacyFines.cs b/ObservatoryFramework/Files/Journal/StationServices/PayLegacyFines.cs index 0a20db7..e634869 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/PayLegacyFines.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/PayLegacyFines.cs @@ -3,6 +3,7 @@ [Obsolete(JournalUtilities.ObsoleteMessage)] public class PayLegacyFines : JournalBase { + public override string Event => "PayLegacyFines"; public long Amount { get; init; } public float BrokerPercentage { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/RedeemVoucher.cs b/ObservatoryFramework/Files/Journal/StationServices/RedeemVoucher.cs index bc0e4f5..d5bd64e 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/RedeemVoucher.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/RedeemVoucher.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class RedeemVoucher : JournalBase { + public override string Event => "RedeemVoucher"; [JsonConverter(typeof(VoucherTypeConverter))] public VoucherType Type { get; init; } public long Amount { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/RefuelAll.cs b/ObservatoryFramework/Files/Journal/StationServices/RefuelAll.cs index 01777f0..59d28fd 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/RefuelAll.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/RefuelAll.cs @@ -2,6 +2,7 @@ public class RefuelAll : JournalBase { + public override string Event => "RefuelAll"; public int Cost { get; init; } public float Amount { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/RefuelPartial.cs b/ObservatoryFramework/Files/Journal/StationServices/RefuelPartial.cs index b21acda..8162136 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/RefuelPartial.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/RefuelPartial.cs @@ -2,5 +2,5 @@ public class RefuelPartial : RefuelAll { - + public override string Event => "RefuelPartial"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/Repair.cs b/ObservatoryFramework/Files/Journal/StationServices/Repair.cs index 7c46226..70a7c88 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/Repair.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/Repair.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class Repair : JournalBase { + public override string Event => "Repair"; public string Item { get; init; } public int Cost { get; init; } public ImmutableList Items { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/RepairAll.cs b/ObservatoryFramework/Files/Journal/StationServices/RepairAll.cs index edbceb7..3649af6 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/RepairAll.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/RepairAll.cs @@ -2,5 +2,6 @@ public class RepairAll : JournalBase { + public override string Event => "RepairAll"; public int Cost { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/StationServices/RestockVehicle.cs b/ObservatoryFramework/Files/Journal/StationServices/RestockVehicle.cs index 7a64e40..98d148c 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/RestockVehicle.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/RestockVehicle.cs @@ -2,6 +2,7 @@ public class RestockVehicle : JournalBase { + public override string Event => "RestockVehicle"; public string Type { get; init; } public string Loadout { get; init; } public int Cost { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ScientificResearch.cs b/ObservatoryFramework/Files/Journal/StationServices/ScientificResearch.cs index b92a3ca..03da170 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ScientificResearch.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ScientificResearch.cs @@ -2,6 +2,7 @@ public class ScientificResearch : JournalBase { + public override string Event => "ScientificResearch"; public ulong MarketID { get; init; } public string Name { get; init; } public string Category { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/SearchAndRescue.cs b/ObservatoryFramework/Files/Journal/StationServices/SearchAndRescue.cs index 13c5ddc..96d96ae 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/SearchAndRescue.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/SearchAndRescue.cs @@ -2,6 +2,7 @@ public class SearchAndRescue : JournalBase { + public override string Event => "SearchAndRescue"; public ulong MarketID { get; init; } public string Name { get; init; } public string Name_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/SellDrones.cs b/ObservatoryFramework/Files/Journal/StationServices/SellDrones.cs index 15401d9..11c4a6b 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/SellDrones.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/SellDrones.cs @@ -2,6 +2,7 @@ public class SellDrones : JournalBase { + public override string Event => "SellDrones"; public string Type { get; init; } public int Count { get; init; } public uint SellPrice { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/SellShipOnRebuy.cs b/ObservatoryFramework/Files/Journal/StationServices/SellShipOnRebuy.cs index e223e1c..34798f3 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/SellShipOnRebuy.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/SellShipOnRebuy.cs @@ -2,6 +2,7 @@ public class SellShipOnRebuy : JournalBase { + public override string Event => "SellShipOnRebuy"; public string ShipType { get; init; } public string System { get; init; } public ulong SellShipId { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/SetUserShipName.cs b/ObservatoryFramework/Files/Journal/StationServices/SetUserShipName.cs index 9c25318..dc066be 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/SetUserShipName.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/SetUserShipName.cs @@ -2,6 +2,7 @@ public class SetUserShipName : JournalBase { + public override string Event => "SetUserShipName"; public string Ship { get; init; } public ulong ShipID { get; init; } public string UserShipName { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/Shipyard.cs b/ObservatoryFramework/Files/Journal/StationServices/Shipyard.cs index 97d6d04..2d2e709 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/Shipyard.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/Shipyard.cs @@ -2,6 +2,7 @@ public class Shipyard : JournalBase { + public override string Event => "Shipyard"; public ulong MarketID { get; init; } /// /// Name of the station at which this event occurred. diff --git a/ObservatoryFramework/Files/Journal/StationServices/ShipyardBuy.cs b/ObservatoryFramework/Files/Journal/StationServices/ShipyardBuy.cs index 164fd5c..3e15a47 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ShipyardBuy.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ShipyardBuy.cs @@ -2,6 +2,7 @@ public class ShipyardBuy : JournalBase { + public override string Event => "ShipyardBuy"; public ulong MarketID { get; init; } public string ShipType { get; init; } public string ShipType_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ShipyardNew.cs b/ObservatoryFramework/Files/Journal/StationServices/ShipyardNew.cs index d8d2046..d723afb 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ShipyardNew.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ShipyardNew.cs @@ -2,6 +2,7 @@ public class ShipyardNew : JournalBase { + public override string Event => "ShipyardNew"; public string ShipType { get; init; } public string ShipType_Localised { get; init; } public ulong NewShipID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ShipyardSell.cs b/ObservatoryFramework/Files/Journal/StationServices/ShipyardSell.cs index ecd7eac..687f355 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ShipyardSell.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ShipyardSell.cs @@ -2,6 +2,7 @@ public class ShipyardSell : JournalBase { + public override string Event => "ShipyardSell"; public ulong MarketID { get; init; } public string ShipType { get; init; } public ulong SellShipID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ShipyardSwap.cs b/ObservatoryFramework/Files/Journal/StationServices/ShipyardSwap.cs index b1d12c3..fff92f1 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ShipyardSwap.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ShipyardSwap.cs @@ -2,6 +2,7 @@ public class ShipyardSwap : JournalBase { + public override string Event => "ShipyardSwap"; public ulong MarketID { get; init; } public string ShipType { get; init; } public string ShipType_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/ShipyardTransfer.cs b/ObservatoryFramework/Files/Journal/StationServices/ShipyardTransfer.cs index 88372ed..52aa350 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/ShipyardTransfer.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/ShipyardTransfer.cs @@ -2,6 +2,7 @@ public class ShipyardTransfer : JournalBase { + public override string Event => "ShipyardTransfer"; public ulong MarketID { get; init; } public string ShipType { get; init; } public string ShipType_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/StationServices/StoredModules.cs b/ObservatoryFramework/Files/Journal/StationServices/StoredModules.cs index 678fc65..1d27d95 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/StoredModules.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/StoredModules.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class StoredModules : JournalBase { + public override string Event => "StoredModules"; public string StarSystem { get; init; } /// /// Name of the station at which this event occurred. diff --git a/ObservatoryFramework/Files/Journal/StationServices/StoredShips.cs b/ObservatoryFramework/Files/Journal/StationServices/StoredShips.cs index 34e8704..87a1fdb 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/StoredShips.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/StoredShips.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class StoredShips : JournalBase { + public override string Event => "StoredShips"; public ulong MarketID { get; init; } /// /// Name of the station at which this event occurred. diff --git a/ObservatoryFramework/Files/Journal/StationServices/TechnologyBroker.cs b/ObservatoryFramework/Files/Journal/StationServices/TechnologyBroker.cs index baba232..d9e5cf6 100644 --- a/ObservatoryFramework/Files/Journal/StationServices/TechnologyBroker.cs +++ b/ObservatoryFramework/Files/Journal/StationServices/TechnologyBroker.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.StationServices; public class TechnologyBroker : JournalBase { + public override string Event => "TechnologyBroker"; public string BrokerType { get; init; } public ulong MarketID { get; init; } public ImmutableList ItemsUnlocked { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Trade/AsteroidCracked.cs b/ObservatoryFramework/Files/Journal/Trade/AsteroidCracked.cs index 4dc62a3..3e054a5 100644 --- a/ObservatoryFramework/Files/Journal/Trade/AsteroidCracked.cs +++ b/ObservatoryFramework/Files/Journal/Trade/AsteroidCracked.cs @@ -2,5 +2,6 @@ public class AsteroidCracked : JournalBase { + public override string Event => "AsteroidCracked"; public string Body { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Trade/BuyTradeData.cs b/ObservatoryFramework/Files/Journal/Trade/BuyTradeData.cs index 657b0cc..af063c9 100644 --- a/ObservatoryFramework/Files/Journal/Trade/BuyTradeData.cs +++ b/ObservatoryFramework/Files/Journal/Trade/BuyTradeData.cs @@ -2,6 +2,7 @@ public class BuyTradeData : JournalBase { + public override string Event => "BuyTradeData"; public string System { get; init; } public long Cost { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Trade/CollectCargo.cs b/ObservatoryFramework/Files/Journal/Trade/CollectCargo.cs index e05cde4..3b63eeb 100644 --- a/ObservatoryFramework/Files/Journal/Trade/CollectCargo.cs +++ b/ObservatoryFramework/Files/Journal/Trade/CollectCargo.cs @@ -2,6 +2,7 @@ public class CollectCargo : JournalBase { + public override string Event => "CollectCargo"; public string Type { get; init; } public string Type_Localised { get; init; } public bool Stolen { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Trade/EjectCargo.cs b/ObservatoryFramework/Files/Journal/Trade/EjectCargo.cs index 9cfe184..d3033a5 100644 --- a/ObservatoryFramework/Files/Journal/Trade/EjectCargo.cs +++ b/ObservatoryFramework/Files/Journal/Trade/EjectCargo.cs @@ -2,6 +2,7 @@ public class EjectCargo : JournalBase { + public override string Event => "EjectCargo"; public string Type { get; init; } public string Type_Localised { get; init; } public int Count { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Trade/MarketBuy.cs b/ObservatoryFramework/Files/Journal/Trade/MarketBuy.cs index 2cb9e54..2fc950d 100644 --- a/ObservatoryFramework/Files/Journal/Trade/MarketBuy.cs +++ b/ObservatoryFramework/Files/Journal/Trade/MarketBuy.cs @@ -2,6 +2,7 @@ public class MarketBuy : JournalBase { + public override string Event => "MarketBuy"; public ulong MarketID { get; init; } public string Type { get; init; } public string Type_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Trade/MarketSell.cs b/ObservatoryFramework/Files/Journal/Trade/MarketSell.cs index 4dec66c..8d3a880 100644 --- a/ObservatoryFramework/Files/Journal/Trade/MarketSell.cs +++ b/ObservatoryFramework/Files/Journal/Trade/MarketSell.cs @@ -2,6 +2,7 @@ public class MarketSell : JournalBase { + public override string Event => "MarketSell"; public ulong MarketID { get; init; } public string Type { get; init; } public string Type_Localised { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Trade/MiningRefined.cs b/ObservatoryFramework/Files/Journal/Trade/MiningRefined.cs index 0eb23e9..9590b46 100644 --- a/ObservatoryFramework/Files/Journal/Trade/MiningRefined.cs +++ b/ObservatoryFramework/Files/Journal/Trade/MiningRefined.cs @@ -2,6 +2,7 @@ public class MiningRefined : JournalBase { + public override string Event => "MiningRefined"; public string Type { get; init; } public string Type_Localised { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Travel/ApproachBody.cs b/ObservatoryFramework/Files/Journal/Travel/ApproachBody.cs index 61841e3..e74bdc0 100644 --- a/ObservatoryFramework/Files/Journal/Travel/ApproachBody.cs +++ b/ObservatoryFramework/Files/Journal/Travel/ApproachBody.cs @@ -2,6 +2,7 @@ public class ApproachBody : JournalBase { + public override string Event => "ApproachBody"; public string StarSystem { get; init; } public ulong SystemAddress { get; init; } public string Body { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/Docked.cs b/ObservatoryFramework/Files/Journal/Travel/Docked.cs index 2a93f85..083eb4e 100644 --- a/ObservatoryFramework/Files/Journal/Travel/Docked.cs +++ b/ObservatoryFramework/Files/Journal/Travel/Docked.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.Travel; public class Docked : JournalBase { + public override string Event => "Docked"; /// /// Name of the station at which this event occurred. /// diff --git a/ObservatoryFramework/Files/Journal/Travel/DockingCancelled.cs b/ObservatoryFramework/Files/Journal/Travel/DockingCancelled.cs index 47f3d22..8383098 100644 --- a/ObservatoryFramework/Files/Journal/Travel/DockingCancelled.cs +++ b/ObservatoryFramework/Files/Journal/Travel/DockingCancelled.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Travel; public class DockingCancelled : DockingRequested -{ } \ No newline at end of file +{ + public override string Event => "DockingCancelled"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Travel/DockingDenied.cs b/ObservatoryFramework/Files/Journal/Travel/DockingDenied.cs index 8a45036..efd59f9 100644 --- a/ObservatoryFramework/Files/Journal/Travel/DockingDenied.cs +++ b/ObservatoryFramework/Files/Journal/Travel/DockingDenied.cs @@ -5,6 +5,7 @@ namespace Observatory.Framework.Files.Journal.Travel; public class DockingDenied : DockingCancelled { + public override string Event => "DockingDenied"; [JsonConverter(typeof(JsonStringEnumConverter))] public Reason Reason { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Travel/DockingGranted.cs b/ObservatoryFramework/Files/Journal/Travel/DockingGranted.cs index 251a703..0fa8f06 100644 --- a/ObservatoryFramework/Files/Journal/Travel/DockingGranted.cs +++ b/ObservatoryFramework/Files/Journal/Travel/DockingGranted.cs @@ -2,5 +2,6 @@ public class DockingGranted : DockingCancelled { + public override string Event => "DockingGranted"; public int LandingPad { get; init; } } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Travel/DockingRequested.cs b/ObservatoryFramework/Files/Journal/Travel/DockingRequested.cs index 0a07af3..272c297 100644 --- a/ObservatoryFramework/Files/Journal/Travel/DockingRequested.cs +++ b/ObservatoryFramework/Files/Journal/Travel/DockingRequested.cs @@ -4,6 +4,7 @@ namespace Observatory.Framework.Files.Journal.Travel; public class DockingRequested : JournalBase { + public override string Event => "DockingRequested"; /// /// Name of the station at which this event occurred. /// diff --git a/ObservatoryFramework/Files/Journal/Travel/DockingTimeout.cs b/ObservatoryFramework/Files/Journal/Travel/DockingTimeout.cs index 65f7a8a..be6510e 100644 --- a/ObservatoryFramework/Files/Journal/Travel/DockingTimeout.cs +++ b/ObservatoryFramework/Files/Journal/Travel/DockingTimeout.cs @@ -2,4 +2,5 @@ public class DockingTimeout : DockingRequested { + public override string Event => "DockingTimeout"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Travel/FSDJump.cs b/ObservatoryFramework/Files/Journal/Travel/FSDJump.cs index 01f4ed9..d19aa70 100644 --- a/ObservatoryFramework/Files/Journal/Travel/FSDJump.cs +++ b/ObservatoryFramework/Files/Journal/Travel/FSDJump.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.Travel; public class FSDJump : JournalBase { + public override string Event => "FSDJump"; public string StarSystem { get; init; } public ulong SystemAddress { get; init; } [JsonConverter(typeof(StarPosConverter))] diff --git a/ObservatoryFramework/Files/Journal/Travel/FSDTarget.cs b/ObservatoryFramework/Files/Journal/Travel/FSDTarget.cs index 214e558..8674378 100644 --- a/ObservatoryFramework/Files/Journal/Travel/FSDTarget.cs +++ b/ObservatoryFramework/Files/Journal/Travel/FSDTarget.cs @@ -2,6 +2,7 @@ public class FSDTarget : JournalBase { + public override string Event => "FSDTarget"; public string Name { get; init; } public ulong SystemAddress { get; init; } public string StarClass { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/LeaveBody.cs b/ObservatoryFramework/Files/Journal/Travel/LeaveBody.cs index d4e0550..5d9cd5e 100644 --- a/ObservatoryFramework/Files/Journal/Travel/LeaveBody.cs +++ b/ObservatoryFramework/Files/Journal/Travel/LeaveBody.cs @@ -2,6 +2,7 @@ public class LeaveBody : JournalBase { + public override string Event => "LeaveBody"; public string StarSystem { get; init; } public ulong SystemAddress { get; init; } public string Body { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/Liftoff.cs b/ObservatoryFramework/Files/Journal/Travel/Liftoff.cs index c2583ce..b2b1cd0 100644 --- a/ObservatoryFramework/Files/Journal/Travel/Liftoff.cs +++ b/ObservatoryFramework/Files/Journal/Travel/Liftoff.cs @@ -1,4 +1,6 @@ namespace Observatory.Framework.Files.Journal.Travel; public class Liftoff : Touchdown -{ } \ No newline at end of file +{ + public override string Event => "Liftoff"; +} \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Travel/Location.cs b/ObservatoryFramework/Files/Journal/Travel/Location.cs index 6a7fa37..60ac74f 100644 --- a/ObservatoryFramework/Files/Journal/Travel/Location.cs +++ b/ObservatoryFramework/Files/Journal/Travel/Location.cs @@ -7,6 +7,7 @@ namespace Observatory.Framework.Files.Journal.Travel; public class Location : JournalBase { + public override string Event => "Location"; [JsonConverter(typeof(IntBoolFlexConverter))] public bool Docked { get; init; } public double DistFromStarLS { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/NavRoute.cs b/ObservatoryFramework/Files/Journal/Travel/NavRoute.cs index 88b7626..cf823f8 100644 --- a/ObservatoryFramework/Files/Journal/Travel/NavRoute.cs +++ b/ObservatoryFramework/Files/Journal/Travel/NavRoute.cs @@ -2,4 +2,5 @@ public class NavRoute : JournalBase { + public override string Event => "NavRoute"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Travel/NavRouteClear.cs b/ObservatoryFramework/Files/Journal/Travel/NavRouteClear.cs index 83d3863..de26bc8 100644 --- a/ObservatoryFramework/Files/Journal/Travel/NavRouteClear.cs +++ b/ObservatoryFramework/Files/Journal/Travel/NavRouteClear.cs @@ -2,4 +2,5 @@ public class NavRouteClear : JournalBase { + public override string Event => "NavRouteClear"; } \ No newline at end of file diff --git a/ObservatoryFramework/Files/Journal/Travel/StartJump.cs b/ObservatoryFramework/Files/Journal/Travel/StartJump.cs index 5f78ece..c184d25 100644 --- a/ObservatoryFramework/Files/Journal/Travel/StartJump.cs +++ b/ObservatoryFramework/Files/Journal/Travel/StartJump.cs @@ -2,6 +2,7 @@ public class StartJump : JournalBase { + public override string Event => "StartJump"; public string JumpType { get; init; } public string StarSystem { get; init; } public ulong SystemAddress { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/SupercruiseDestinationDrop.cs b/ObservatoryFramework/Files/Journal/Travel/SupercruiseDestinationDrop.cs index a139652..040465e 100644 --- a/ObservatoryFramework/Files/Journal/Travel/SupercruiseDestinationDrop.cs +++ b/ObservatoryFramework/Files/Journal/Travel/SupercruiseDestinationDrop.cs @@ -2,6 +2,7 @@ public class SupercruiseDestinationDrop : JournalBase { + public override string Event => "SupercruiseDestinationDrop"; public string Type { get; init; } public int Threat { get; init; } public ulong MarketID { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/SupercruiseEntry.cs b/ObservatoryFramework/Files/Journal/Travel/SupercruiseEntry.cs index 2686a02..a11e78f 100644 --- a/ObservatoryFramework/Files/Journal/Travel/SupercruiseEntry.cs +++ b/ObservatoryFramework/Files/Journal/Travel/SupercruiseEntry.cs @@ -1,7 +1,8 @@ namespace Observatory.Framework.Files.Journal.Travel; public class SupercruiseEntry : JournalBase -{ +{ + public override string Event => "SupercruiseEntry"; public string StarSystem { get; init; } public ulong SystemAddress { get; init; } public bool Taxi { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/SupercruiseExit.cs b/ObservatoryFramework/Files/Journal/Travel/SupercruiseExit.cs index 0bacaae..84248d7 100644 --- a/ObservatoryFramework/Files/Journal/Travel/SupercruiseExit.cs +++ b/ObservatoryFramework/Files/Journal/Travel/SupercruiseExit.cs @@ -2,6 +2,7 @@ public class SupercruiseExit : SupercruiseEntry { + public override string Event => "SupercruiseExit"; public string Body { get; init; } public int BodyID { get; init; } public string BodyType { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/Touchdown.cs b/ObservatoryFramework/Files/Journal/Travel/Touchdown.cs index ea11a3b..12b764a 100644 --- a/ObservatoryFramework/Files/Journal/Travel/Touchdown.cs +++ b/ObservatoryFramework/Files/Journal/Travel/Touchdown.cs @@ -2,6 +2,7 @@ public class Touchdown : JournalBase { + public override string Event => "Touchdown"; public double Latitude { get; init; } public double Longitude { get; init; } public string NearestDestination { get; init; } diff --git a/ObservatoryFramework/Files/Journal/Travel/Undocked.cs b/ObservatoryFramework/Files/Journal/Travel/Undocked.cs index a6b06fd..2bfad67 100644 --- a/ObservatoryFramework/Files/Journal/Travel/Undocked.cs +++ b/ObservatoryFramework/Files/Journal/Travel/Undocked.cs @@ -2,6 +2,7 @@ public class Undocked : JournalBase { + public override string Event => "Undocked"; /// /// Name of the station at which this event occurred. /// diff --git a/ObservatoryFramework/Files/MarketFile.cs b/ObservatoryFramework/Files/MarketFile.cs index 595d68a..12860a5 100644 --- a/ObservatoryFramework/Files/MarketFile.cs +++ b/ObservatoryFramework/Files/MarketFile.cs @@ -9,6 +9,7 @@ namespace Observatory.Framework.Files; /// public class MarketFile : JournalBase { + public override string Event => "Market"; /// /// Unique ID of current market. /// diff --git a/ObservatoryFramework/Files/ModuleInfoFile.cs b/ObservatoryFramework/Files/ModuleInfoFile.cs index 56320db..9d037bc 100644 --- a/ObservatoryFramework/Files/ModuleInfoFile.cs +++ b/ObservatoryFramework/Files/ModuleInfoFile.cs @@ -9,6 +9,7 @@ namespace Observatory.Framework.Files; /// public class ModuleInfoFile : JournalBase { + public override string Event => "ModuleInfo"; /// /// List of all equipped modules. /// diff --git a/ObservatoryFramework/Files/NavRouteFile.cs b/ObservatoryFramework/Files/NavRouteFile.cs index 4d5508d..91fed0b 100644 --- a/ObservatoryFramework/Files/NavRouteFile.cs +++ b/ObservatoryFramework/Files/NavRouteFile.cs @@ -9,6 +9,7 @@ namespace Observatory.Framework.Files; /// public class NavRouteFile : JournalBase { + public override string Event => "Route"; /// /// List of star systems and their locations in the current route. /// diff --git a/ObservatoryFramework/Files/OutfittingFile.cs b/ObservatoryFramework/Files/OutfittingFile.cs index 2d14a35..0262c91 100644 --- a/ObservatoryFramework/Files/OutfittingFile.cs +++ b/ObservatoryFramework/Files/OutfittingFile.cs @@ -9,6 +9,7 @@ namespace Observatory.Framework.Files; /// public class OutfittingFile : JournalBase { + public override string Event => "Outfitting"; /// /// Unique ID of current market. /// diff --git a/ObservatoryFramework/Files/ShipyardFile.cs b/ObservatoryFramework/Files/ShipyardFile.cs index a54e7b9..259020c 100644 --- a/ObservatoryFramework/Files/ShipyardFile.cs +++ b/ObservatoryFramework/Files/ShipyardFile.cs @@ -9,6 +9,7 @@ namespace Observatory.Framework.Files; /// public class ShipyardFile : JournalBase { + public override string Event => "Shipyard"; /// /// Unique ID of current market. /// diff --git a/ObservatoryFramework/Files/Status.cs b/ObservatoryFramework/Files/Status.cs index 8c35edc..8fe332c 100644 --- a/ObservatoryFramework/Files/Status.cs +++ b/ObservatoryFramework/Files/Status.cs @@ -10,6 +10,7 @@ namespace Observatory.Framework.Files; /// public class Status : JournalBase { + public override string Event => "Status"; /// /// Set of flags representing current player state. /// diff --git a/ObservatoryFramework/JournalInvalidDoubleConverter.cs b/ObservatoryFramework/JournalInvalidDoubleConverter.cs new file mode 100644 index 0000000..16af6f2 --- /dev/null +++ b/ObservatoryFramework/JournalInvalidDoubleConverter.cs @@ -0,0 +1,21 @@ +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Observatory.Framework; + +public class JournalInvalidDoubleConverter : JsonConverter +{ + public override double Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var success = reader.TryGetDouble(out var value); + if (success) + return value; + + return 0; + } + + public override void Write(Utf8JsonWriter writer, double value, JsonSerializerOptions options) + { + JsonSerializer.Serialize(writer, value, options); + } +} \ No newline at end of file diff --git a/ObservatoryFramework/JournalInvalidFloatConverter.cs b/ObservatoryFramework/JournalInvalidFloatConverter.cs new file mode 100644 index 0000000..fc9c54f --- /dev/null +++ b/ObservatoryFramework/JournalInvalidFloatConverter.cs @@ -0,0 +1,21 @@ +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Observatory.Framework; + +public class JournalInvalidFloatConverter : JsonConverter +{ + public override float Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var success = reader.TryGetSingle(out var value); + if (success) + return value; + + return 0; + } + + public override void Write(Utf8JsonWriter writer, float value, JsonSerializerOptions options) + { + JsonSerializer.Serialize(writer, value, options); + } +} \ No newline at end of file diff --git a/Pulsar.sln b/Pulsar.sln index 6be4d9f..1902977 100644 --- a/Pulsar.sln +++ b/Pulsar.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Botanist", "Botanist\Botani EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObservatoryFramework", "ObservatoryFramework\ObservatoryFramework.csproj", "{27525BDD-2940-4CB2-8B76-395677997AEF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject1", "TestProject1\TestProject1.csproj", "{0B98F709-5D13-4C33-911C-E654C2E93FB8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +29,10 @@ Global {27525BDD-2940-4CB2-8B76-395677997AEF}.Debug|Any CPU.Build.0 = Debug|Any CPU {27525BDD-2940-4CB2-8B76-395677997AEF}.Release|Any CPU.ActiveCfg = Release|Any CPU {27525BDD-2940-4CB2-8B76-395677997AEF}.Release|Any CPU.Build.0 = Release|Any CPU + {0B98F709-5D13-4C33-911C-E654C2E93FB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B98F709-5D13-4C33-911C-E654C2E93FB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B98F709-5D13-4C33-911C-E654C2E93FB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B98F709-5D13-4C33-911C-E654C2E93FB8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Pulsar/Features/Cargo/CargoController.cs b/Pulsar/Features/Cargo/CargoController.cs deleted file mode 100644 index 084497f..0000000 --- a/Pulsar/Features/Cargo/CargoController.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Observatory.Framework.Files; - -namespace Pulsar.Features.Cargo; - -[ApiController] -[Route("api/[controller]")] -public class CargoController(ICargoService cargoService) : ControllerBase -{ - public async Task> Get() - { - return Ok(await cargoService.Get()); - } -} \ No newline at end of file diff --git a/Pulsar/Features/Cargo/CargoService.cs b/Pulsar/Features/Cargo/CargoService.cs index b1f4a0e..c79e36d 100644 --- a/Pulsar/Features/Cargo/CargoService.cs +++ b/Pulsar/Features/Cargo/CargoService.cs @@ -8,7 +8,7 @@ public class CargoService(IOptions options, ILogger "Cargo.json"; - public async Task HandleFile(string filePath) + public async Task HandleFile(string filePath, CancellationToken token = new()) { if (!FileHelper.ValidateFile(filePath)) { @@ -16,7 +16,7 @@ public class CargoService(IOptions options, ILogger(file); + var moduleInfo = await JsonSerializer.DeserializeAsync(file, cancellationToken: token); if (moduleInfo == null) { diff --git a/Pulsar/Features/EventsHub.cs b/Pulsar/Features/EventsHub.cs index 5efe0d1..18eb0fc 100644 --- a/Pulsar/Features/EventsHub.cs +++ b/Pulsar/Features/EventsHub.cs @@ -6,6 +6,12 @@ using Observatory.Framework.Files.Journal.Odyssey; public class EventsHub : Hub { + public async Task Status([FromServices] IStatusService statusService) + { + var status = await statusService.Get(); + await Clients.Caller.StatusUpdated(status); + } + public async Task StatusUpdated(Observatory.Framework.Files.Status status) => await Clients.All.StatusUpdated(status); public async Task OutfittingUpdated(OutfittingFile outfitting) => await Clients.All.OutfittingUpdated(outfitting); @@ -21,7 +27,7 @@ public class EventsHub : Hub public async Task ModuleInfoUpdated(ModuleInfoFile moduleInfo) => await Clients.All.ModuleInfoUpdated(moduleInfo); public async Task FleetCarrierUpdated(FCMaterialsFile fleetCarrier) => await Clients.All.FleetCarrierUpdated(fleetCarrier); - + public async Task CargoUpdated(CargoFile cargo) => await Clients.All.CargoUpdated(cargo); public async Task BackpackUpdated(BackpackFile backpack) => await Clients.All.BackpackUpdated(backpack); diff --git a/Pulsar/Features/FileHandlerService.cs b/Pulsar/Features/FileHandlerService.cs index 2d70e84..cc0071f 100644 --- a/Pulsar/Features/FileHandlerService.cs +++ b/Pulsar/Features/FileHandlerService.cs @@ -1,3 +1,4 @@ +using System.Collections.Concurrent; using Observatory.Framework.Files; using Observatory.Framework.Files.Journal; using Observatory.Framework.Files.Journal.Odyssey; @@ -5,7 +6,7 @@ namespace Pulsar.Features; public interface IFileHandler { - Task HandleFile(string path); + Task HandleFile(string path, CancellationToken token = new()); } public interface IFileHandlerService : IFileHandler; @@ -60,8 +61,9 @@ public class FileHandlerService( { OutfittingFileName, typeof(IJournalHandler) }, { JournalLogFileNameStart, typeof(IJournalHandler>) } }; + - public async Task HandleFile(string path) + public async Task HandleFile(string path, CancellationToken token = new()) { var fileInfo = new FileInfo(path); var fileName = fileInfo.Name; @@ -78,7 +80,7 @@ public class FileHandlerService( if (!Handlers.TryGetValue(match, out var type)) { - logger.LogInformation("File {FileName} was not handled", fileName); + logger.LogWarning("File {FileName} was not handled", fileName); return; } @@ -89,6 +91,6 @@ public class FileHandlerService( } logger.LogInformation("Handling file {FileName} with Type {Type}", fileName, handler.GetType().ToString()); - await handler.HandleFile(path); + await handler.HandleFile(path, token); } } \ No newline at end of file diff --git a/Pulsar/Features/FileWatcherService.cs b/Pulsar/Features/FileWatcherService.cs index 9e9a69a..e74d1ae 100644 --- a/Pulsar/Features/FileWatcherService.cs +++ b/Pulsar/Features/FileWatcherService.cs @@ -16,17 +16,17 @@ public class FileWatcherService(IOptions options, IFileHand } watcher = new PhysicalFileProvider(options.Value.JournalDirectory); - Watch(); + Watch(cancellationToken); // read the journal directory to get the initial files #if DEBUG Task.Run(() => { - Thread.Sleep(TimeSpan.FromSeconds(10)); - HandleFileChanged(); + Thread.Sleep(TimeSpan.FromSeconds(2)); + HandleFileChanged(cancellationToken); }, cancellationToken); #else - HandleFileChanged(); + HandleFileChanged(cancellationToken); #endif @@ -35,38 +35,47 @@ public class FileWatcherService(IOptions options, IFileHand ConcurrentDictionary FileDates = new(); - private void HandleFileChanged(object? sender = null) + private void HandleFileChanged(CancellationToken token = new()) { + var tasks = new List(); foreach (var file in watcher.GetDirectoryContents("")) { if (file.IsDirectory || !file.Name.EndsWith(".json") && !(file.Name.StartsWith(FileHandlerService.JournalLogFileNameStart) && file.Name.EndsWith(FileHandlerService.JournalLogFileNameEnd))) { - continue; + return; } + FileDates.AddOrUpdate(file.PhysicalPath, _ => { - Task.Run(() => fileHandlerService.HandleFile(file.PhysicalPath)); + tasks.Add(Task.Run(() => fileHandlerService.HandleFile(file.PhysicalPath, token), token)); return file.LastModified; }, (_, existing) => { if (existing != file.LastModified) { - Task.Run(() => fileHandlerService.HandleFile(file.PhysicalPath)); + tasks.Add(Task.Run(() => fileHandlerService.HandleFile(file.PhysicalPath, token), token)); } return file.LastModified; }); } - Watch(); + Watch(token); + + Task.WaitAll(tasks.ToArray(), token); } - private void Watch() + private void Watch(CancellationToken token) { - watcher.Watch("*.*").RegisterChangeCallback(HandleFileChanged, null); + void Handle(object? _) + { + HandleFileChanged(token); + } + + watcher.Watch("*.*").RegisterChangeCallback(Handle, null); } public Task StopAsync(CancellationToken cancellationToken) diff --git a/Pulsar/Features/Journal/JournalProcessor.cs b/Pulsar/Features/Journal/JournalProcessor.cs new file mode 100644 index 0000000..b0ee92a --- /dev/null +++ b/Pulsar/Features/Journal/JournalProcessor.cs @@ -0,0 +1,109 @@ +namespace Pulsar.Features.Journal; + +using Observatory.Framework; +using Observatory.Framework.Files.Journal; + +public class JournalProcessor( + ILogger logger, + IJournalService journalService, + IEventHubContext hub) : IJournalProcessor, IHostedService, IDisposable +{ + private CancellationTokenSource tokenSource = new(); + + readonly JsonSerializerOptions options = new() + { + PropertyNameCaseInsensitive = true, + AllowOutOfOrderMetadataProperties = true, + Converters = { new JournalInvalidDoubleConverter(), new JournalInvalidFloatConverter() }, + NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals, + }; + + public async Task HandleFileInner(string filePath, CancellationToken token = new()) + { + logger.LogInformation("Processing journal file: '{File}'", filePath); + var file = await File.ReadAllBytesAsync(filePath, token); + var lines = file.Split(Encoding.UTF8.GetBytes(Environment.NewLine)).ToList(); + var newJournals = new List(); + //await Parallel.ForEachAsync(lines, new ParallelOptions() { MaxDegreeOfParallelism = 32, TaskScheduler = TaskScheduler.Default, CancellationToken = token}, (line, _) => + for (var index = 0; index < lines.Count; index++) + { + var line = lines[index]; + if (line.Count == 0) + { +// return ValueTask.CompletedTask; + continue; + } + + if (line.Contains("\"RotationPeriod\":inf"u8.ToArray())) + { + var newLine = line.Replace("\"RotationPeriod\":inf"u8, "\"RotationPeriod\":0"u8); + line = newLine; + } + + try + { + var journal = JsonSerializer.Deserialize(new ReadOnlySpan(line.ToArray()), options); + if (journal == null) + { + //return ValueTask.CompletedTask; + continue; + } + + newJournals.Add(journal); + } + catch (JsonException ex) + { + logger.LogError(ex, "Error deserializing journal file: '{File}', line: {Line}", filePath, line); + } + + //return ValueTask.CompletedTask; + } + + + if (newJournals.Any()) + { + await hub.Clients.All.JournalUpdated(newJournals); + } + } + + public Task StartAsync(CancellationToken cancellationToken) + { + tokenSource.Dispose(); + tokenSource = new(); + ProcessQueue(); + return Task.CompletedTask; + } + + private void ProcessQueue() + { + Task.Run(async () => + { + while (!tokenSource.Token.IsCancellationRequested) + { + if (journalService.TryDequeue(out var file)) + { + await HandleFileInner(file, tokenSource.Token); + } + else + { + await Task.Delay(1000); + } + } + }, tokenSource.Token); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + tokenSource?.Cancel(); + return Task.CompletedTask; + } + + public void Dispose() + { + tokenSource?.Dispose(); + } +} + +public interface IJournalProcessor +{ +} \ No newline at end of file diff --git a/Pulsar/Features/Journal/JournalService.cs b/Pulsar/Features/Journal/JournalService.cs index e619ded..17cab24 100644 --- a/Pulsar/Features/Journal/JournalService.cs +++ b/Pulsar/Features/Journal/JournalService.cs @@ -1,77 +1,42 @@ namespace Pulsar.Features.Journal; using System.Collections.Concurrent; -using System.Text.RegularExpressions; using Observatory.Framework.Files.Journal; -public interface IJournalService : IJournalHandler>; +public interface IJournalService : IJournalHandler> +{ + public bool TryDequeue(out string filePath); +} public class JournalService( - ILogger logger, - IOptions options, - IEventHubContext hub, - PulsarContext context, - IServiceProvider serviceProvider + ILogger logger ) : IJournalService { public string FileName => FileHandlerService.JournalLogFileName; - static ConcurrentBag _journals = new(); + private readonly ConcurrentQueue JournalFileQueue = new(); - static DateTimeOffset notBefore = DateTimeOffset.UtcNow.AddHours(-1); - - readonly JsonSerializerOptions options = new() + public void EnqueueFile(string filePath) { - PropertyNameCaseInsensitive = true, - AllowOutOfOrderMetadataProperties = true, - // Converters = { ActivatorUtilities.CreateInstance(serviceProvider) } - }; + JournalFileQueue.Enqueue(filePath); + } + + public bool TryDequeue(out string filePath) + { + return JournalFileQueue.TryDequeue(out filePath); + } - public async Task HandleFile(string filePath) + public Task HandleFile(string filePath, CancellationToken token = new()) { if (!FileHelper.ValidateFile(filePath)) { - return; + return Task.CompletedTask; } - var file = await File.ReadAllLinesAsync(filePath, Encoding.UTF8); - var newJournals = new List(); - await Parallel.ForEachAsync(file, (line, _) => - { - if (string.IsNullOrWhiteSpace(line)) - { - return ValueTask.CompletedTask; - } - - var journal = JsonSerializer.Deserialize(line, options); - if (journal == null) - { - return ValueTask.CompletedTask; - } - - if (_journals.Any(j => j.Timestamp == journal.Timestamp && j.GetType() == journal.GetType())) - { - return ValueTask.CompletedTask; - } - - _journals.Add(journal); - - if (journal.Timestamp < notBefore) - { - return ValueTask.CompletedTask; - } - - newJournals.Add(journal); - return ValueTask.CompletedTask; - }); - - - if (newJournals.Any()) - { - await hub.Clients.All.JournalUpdated(newJournals); - } + EnqueueFile(filePath); + return Task.CompletedTask; } - + public async Task> Get() { return []; diff --git a/Pulsar/Features/ModulesInfo/ModulesInfoController.cs b/Pulsar/Features/ModulesInfo/ModulesInfoController.cs deleted file mode 100644 index f08ccca..0000000 --- a/Pulsar/Features/ModulesInfo/ModulesInfoController.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Pulsar.Features.ModulesInfo; - -[ApiController] -[Route("api/[controller]")] -public class ModulesInfoController(IModulesInfoService modulesInfo) : ControllerBase -{ - [HttpGet] - public async Task Get() - { - return Ok(await modulesInfo.Get()); - } -} \ No newline at end of file diff --git a/Pulsar/Features/ModulesInfo/ModulesInfoService.cs b/Pulsar/Features/ModulesInfo/ModulesInfoService.cs index f787d7a..c6f23cf 100644 --- a/Pulsar/Features/ModulesInfo/ModulesInfoService.cs +++ b/Pulsar/Features/ModulesInfo/ModulesInfoService.cs @@ -11,7 +11,7 @@ public class ModulesInfoService( { public string FileName => FileHandlerService.ModulesInfoFileName; - public async Task HandleFile(string filePath) + public async Task HandleFile(string filePath, CancellationToken token = new()) { if (!FileHelper.ValidateFile(filePath)) { @@ -19,7 +19,7 @@ public class ModulesInfoService( } var file = File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - var moduleInfo = await JsonSerializer.DeserializeAsync(file); + var moduleInfo = await JsonSerializer.DeserializeAsync(file, cancellationToken: token); if (moduleInfo == null) { diff --git a/Pulsar/Features/ShipLocker/ShipLockerController.cs b/Pulsar/Features/ShipLocker/ShipLockerController.cs deleted file mode 100644 index 4056b1f..0000000 --- a/Pulsar/Features/ShipLocker/ShipLockerController.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Pulsar.Features.ShipLocker; - -[ApiController] -[Route("api/[controller]")] -public class ShipLockerController(IShipLockerService shipLockerService) : ControllerBase -{ - [HttpGet] - public async Task Get() - { - return Ok(await shipLockerService.Get()); - } -} \ No newline at end of file diff --git a/Pulsar/Features/ShipLocker/ShipLockerService.cs b/Pulsar/Features/ShipLocker/ShipLockerService.cs index 67f67ca..d7a1b8b 100644 --- a/Pulsar/Features/ShipLocker/ShipLockerService.cs +++ b/Pulsar/Features/ShipLocker/ShipLockerService.cs @@ -27,7 +27,7 @@ public class ShipLockerService(ILogger logger, IOptions logger, IOptions(file); + var shipLocker = await JsonSerializer.DeserializeAsync(file, cancellationToken: token); if (shipLocker == null) { diff --git a/Pulsar/Features/Shipyard/ShipyardService.cs b/Pulsar/Features/Shipyard/ShipyardService.cs index af85151..e2aecea 100644 --- a/Pulsar/Features/Shipyard/ShipyardService.cs +++ b/Pulsar/Features/Shipyard/ShipyardService.cs @@ -25,7 +25,7 @@ public class ShipyardService(ILogger logger, IOptions logger, IOptions(file); + var shipyard = await JsonSerializer.DeserializeAsync(file, cancellationToken: token); if (shipyard == null) { diff --git a/Pulsar/Features/Status/StatusController.cs b/Pulsar/Features/Status/StatusController.cs deleted file mode 100644 index 6b0accc..0000000 --- a/Pulsar/Features/Status/StatusController.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Pulsar.Features.Status; - -[ApiController] -[Route("api/[controller]")] -public class StatusController(IStatusService status) : ControllerBase -{ - [HttpGet] - public async Task Get() - { - return Ok(await status.Get()); - } -} \ No newline at end of file diff --git a/Pulsar/Features/Status/StatusService.cs b/Pulsar/Features/Status/StatusService.cs index 807fce1..f24bd19 100644 --- a/Pulsar/Features/Status/StatusService.cs +++ b/Pulsar/Features/Status/StatusService.cs @@ -1,3 +1,6 @@ +using Microsoft.EntityFrameworkCore; +using Observatory.Framework.Files.Journal.Startup; + namespace Pulsar.Features.Status; using Observatory.Framework.Files; @@ -8,12 +11,13 @@ public class StatusService ( ILogger logger, IOptions options, - IEventHubContext hub + IEventHubContext hub, + PulsarContext context ) : IStatusService { public string FileName => FileHandlerService.StatusFileName; - public async Task HandleFile(string filePath) + public async Task HandleFile(string filePath, CancellationToken token = new()) { if (!FileHelper.ValidateFile(filePath)) { @@ -28,7 +32,7 @@ public class StatusService return; } - var status = await JsonSerializer.DeserializeAsync(file); + var status = await JsonSerializer.DeserializeAsync(file, cancellationToken: token); if (status == null) { @@ -45,14 +49,19 @@ public class StatusService if (!FileHelper.ValidateFile(statusFile)) { - return new Status(); + return new (); } await using var file = File.Open(statusFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); var status = await JsonSerializer.DeserializeAsync(file); - if (status != null) return status; + if (status != null) + { + return status; + } logger.LogWarning("Failed to deserialize status file {StatusFile}", statusFile); - return new Status(); + return new (); } + + } \ No newline at end of file diff --git a/Pulsar/Program.cs b/Pulsar/Program.cs index 31ed0dd..ed05f3d 100644 --- a/Pulsar/Program.cs +++ b/Pulsar/Program.cs @@ -2,7 +2,9 @@ using Lamar.Microsoft.DependencyInjection; using Microsoft.AspNetCore.Cors.Infrastructure; using Microsoft.Extensions.FileProviders; using Pulsar.Features; +using Pulsar.Features.Journal; +Console.WriteLine((string?)null!); var builder = WebApplication.CreateBuilder(new WebApplicationOptions() { @@ -35,7 +37,7 @@ builder.Services.AddControllers(); builder.Services.AddCors(options => { options.AddDefaultPolicy(new CorsPolicy() - { Origins = { "http://localhost:5000" }, Headers = { "*" }, Methods = { "*" } }); + { Origins = { "http://172.31.0.222:5000", "http://localhost:5000" }, Headers = { "*" }, Methods = { "*" } }); }); builder.Services.AddSignalR().AddJsonProtocol(options => options.PayloadSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull); @@ -43,17 +45,20 @@ builder.Services.AddDbContext(); builder.Services.Configure(options => options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull); builder.Services.AddReverseProxy().LoadFromConfig(builder.Configuration.GetSection("ReverseProxy")); - +// builder.Services.AddOpenApiDocument(config => config.DocumentName = "v1"); builder.Services.AddHttpForwarder(); builder.Services.AddHostedService(); +builder.Services.AddHostedService(); var app = builder.Build(); - app.UseWebSockets(); -app.UseRouting(); +// app.UseOpenApi(); +// app.UseSwaggerUi(); +app.UseRouting(); app.MapReverseProxy(); app.MapControllers(); app.MapHub("api/events"); app.MapFallbackToFile("index.html").AllowAnonymous(); + await app.RunAsync(); \ No newline at end of file diff --git a/Pulsar/Pulsar.csproj b/Pulsar/Pulsar.csproj index 9c345e0..cf6171c 100644 --- a/Pulsar/Pulsar.csproj +++ b/Pulsar/Pulsar.csproj @@ -19,6 +19,7 @@ + diff --git a/Pulsar/PulsarServiceRegistry.cs b/Pulsar/PulsarServiceRegistry.cs index 1652320..5d1b6fc 100644 --- a/Pulsar/PulsarServiceRegistry.cs +++ b/Pulsar/PulsarServiceRegistry.cs @@ -18,7 +18,7 @@ public class PulsarServiceRegistry : ServiceRegistry For().Use(); For().Use(); For().Use(); - For().Use(); + For().Use().Singleton(); For().Use(); For().Use(); } diff --git a/Pulsar/Utils/CollectionExtesions.cs b/Pulsar/Utils/CollectionExtesions.cs index fc27ed6..956f906 100644 --- a/Pulsar/Utils/CollectionExtesions.cs +++ b/Pulsar/Utils/CollectionExtesions.cs @@ -2,13 +2,135 @@ namespace Pulsar.Utils; public static class CollectionExtensions { - public static void Add(this ICollection<(T1,T2)> collection, T1 t1, T2 t2) + public static void Add(this ICollection<(T1, T2)> collection, T1 t1, T2 t2) { collection.Add((t1, t2)); } - - public static void Add(this ICollection<(T1,T2,T3)> collection, T1 t1, T2 t2, T3 t3) + + public static void Add(this ICollection<(T1, T2, T3)> collection, T1 t1, T2 t2, T3 t3) { collection.Add((t1, t2, t3)); } + + public static IEnumerable> Split(this IEnumerable source, T target) where T : struct + { + List list = new(); + foreach (var v in source) + { + if (v.Equals(target)) + { + yield return list; + list = new(); + } + else + { + list.Add(v); + } + } + + if (list.Any()) + { + yield return list; + } + } + + public static IEnumerable> Split(this ICollection source, T[] target) where T : struct + { + List list = new(); + var i = 0; + var done = false; + using var enumerator = source.GetEnumerator(); + while ((i + target.Length) < source.Count) + { + if (!enumerator.MoveNext()) + { + done = true; + break; + } + + list.Add(enumerator.Current); + + if (list.Count >= target.Length) + { + if (list.TakeLast(target.Length).SequenceEqual(target)) + { + yield return list; + list = new(); + } + } + + i++; + } + + while (!done && enumerator.MoveNext()) + { + list.Add(enumerator.Current); + } + + if (list.Any()) + { + yield return list; + } + } + + public static bool Contains(this IEnumerable source, T[] target) where T : struct + { + List list = new(); + var i = 0; + var done = false; + using var enumerator = source.GetEnumerator(); + while (enumerator.MoveNext()) + { + list.Add(enumerator.Current); + + if (list.Count >= target.Length) + { + if (list.TakeLast(target.Length).SequenceEqual(target)) + { + return true; + } + } + + i++; + } + + return false; + } + + public static List Replace(this IEnumerable source, ReadOnlySpan target, ReadOnlySpan replacement) + { + List result = new(); + List buffer = new (20); + var done = false; + using var enumerator = source.GetEnumerator(); + var targetArray = target.ToArray(); + while (enumerator.MoveNext()) + { + buffer.Add(enumerator.Current); + + if (buffer.Count < target.Length) continue; + + if (buffer.TakeLast(target.Length).SequenceEqual(targetArray)) + { + result.AddRange(replacement.ToArray()); + + buffer.Clear(); + done = true; + break; + } + + if (buffer.Count < target.Length) continue; + result.Add(buffer.First()); + buffer.RemoveAt(0); + } + + result.AddRange(buffer); + + while (done && enumerator.MoveNext()) + { + result.Add(enumerator.Current); + } + + return result; + } } \ No newline at end of file diff --git a/Pulsar/WebApp/.vscode/launch.json b/Pulsar/WebApp/.vscode/launch.json index 28f6f3c..1ca5722 100644 --- a/Pulsar/WebApp/.vscode/launch.json +++ b/Pulsar/WebApp/.vscode/launch.json @@ -4,6 +4,13 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Launch Edge", + "request": "launch", + "type": "msedge", + "url": "http://localhost:5000", + "webRoot": "${workspaceFolder}" + }, { "type": "node", "request": "launch", diff --git a/Pulsar/WebApp/package-lock.json b/Pulsar/WebApp/package-lock.json index 9108bc0..43f4289 100644 --- a/Pulsar/WebApp/package-lock.json +++ b/Pulsar/WebApp/package-lock.json @@ -18,7 +18,7 @@ "eslint-plugin-svelte": "^2.39.0", "globals": "^15.2.0", "sass": "^1.77.2", - "svelte": "^5.0.0-next.136", + "svelte": "^5.0.0-next.141", "svelte-check": "^3.7.1", "tslib": "^2.6.2", "typescript": "^5.4.5", @@ -3070,9 +3070,9 @@ } }, "node_modules/svelte": { - "version": "5.0.0-next.136", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.0.0-next.136.tgz", - "integrity": "sha512-M3jHAIfWZ7K+hjZdvu2p53ZtWE843yubxJfjxeQw9XiwMYG5z6quCA5u8r23GrxAp20JBl36B6ucbZvLUf0Z/g==", + "version": "5.0.0-next.141", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.0.0-next.141.tgz", + "integrity": "sha512-zT74TUo0vOOrbxRfdlWXu+ac4O9lqPFG0YoZB3uOfrOewT1GKxKm0qwG/jo9bGvgZ++TSHjR7AtV091LY2FhBA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.1", diff --git a/Pulsar/WebApp/package.json b/Pulsar/WebApp/package.json index 507cbd0..86cd92d 100644 --- a/Pulsar/WebApp/package.json +++ b/Pulsar/WebApp/package.json @@ -22,7 +22,7 @@ "eslint-plugin-svelte": "^2.39.0", "globals": "^15.2.0", "sass": "^1.77.2", - "svelte": "^5.0.0-next.136", + "svelte": "^5.0.0-next.141", "svelte-check": "^3.7.1", "tslib": "^2.6.2", "typescript": "^5.4.5", diff --git a/Pulsar/WebApp/src/lib/Status.svelte b/Pulsar/WebApp/src/lib/Status.svelte index 2732783..9ed1224 100644 --- a/Pulsar/WebApp/src/lib/Status.svelte +++ b/Pulsar/WebApp/src/lib/Status.svelte @@ -20,18 +20,10 @@ let fuelDown = $state(false); onMount(async () => { - - if ($connection.state === HubConnectionState.Disconnected) - { - await $connection.start(); - } - loading = false; $connection.on("StatusUpdated", (message) => { - statusStore.update((s) => { - return { ...s, ...message }; - }); + $statusStore = { ...$statusStore, ...message }; // only 3 in array if (last.length >= 3) { @@ -66,16 +58,13 @@ } }); + if ($connection.state === HubConnectionState.Disconnected) + { + await $connection.start(); + } + if (!$statusStore.pips) { - const value = (await ( - await fetch("http://localhost:5000/api/status") - ).json()) as Status; - - console.log(value); - - statusStore.set({ - ...value, - }); + await $connection.invoke("Status"); } }); @@ -98,10 +87,13 @@ {/if}
- {#if $statusStore} + {#if $statusStore} Fuel%: {((($statusStore.fuel?.fuelMain ?? 0) / 32) * 100).toFixed(2)}% est{fuelDown ? ' REMAINING' : ' to fill'}: {timeToMax.toFixed(2 )}s + >Fuel%: {((($statusStore.fuel?.fuelMain ?? 0) / 32) * 100).toFixed(2)}% + {#if $statusStore.flags! & StatusFlags.FuelScooping} + est{fuelDown ? ' REMAINING' : ' to fill'}: {timeToMax.toFixed(2 )}s + {/if} +
{$statusStore?.pips?.sys ?? "?"}
@@ -129,8 +121,8 @@ dest?: {$statusStore?.destination?.name} gui focus: {getEnumNameFromValue(FocusStatus, $statusStore.guiFocus!)} cargo: {$statusStore.cargo} - flag1: {getEnumNamesFromFlag(StatusFlags, $statusStore.flags!)} - flag2: {getEnumNamesFromFlag(StatusFlags2, $statusStore.flags2!)} + flag1: {getEnumNamesFromFlag(StatusFlags, $statusStore.flags!)} ({$statusStore.flags}) + flag2: {getEnumNamesFromFlag(StatusFlags2, $statusStore.flags2!)} ({$statusStore.flags2}) {:else} No data :( {/if} diff --git a/Pulsar/WebApp/src/routes/explorer/Explorer.svelte b/Pulsar/WebApp/src/routes/explorer/Explorer.svelte index 00e1a5b..dab4063 100644 --- a/Pulsar/WebApp/src/routes/explorer/Explorer.svelte +++ b/Pulsar/WebApp/src/routes/explorer/Explorer.svelte @@ -3,6 +3,7 @@ import type { FSSDiscoveryScan } from "../../types/api/FSSDiscoveryScan"; import type { Scan } from "../../types/api/Scan"; import type JournalBase from "../../types/api/JournalBase"; + import type { FSSBodySignals } from "../../types/api/Signals"; const data: Partial[] = [{}, {}, {}, {}]; // total bodies in the current system (FSSDiscovery event) @@ -10,6 +11,13 @@ let currentSystem = $state(""); // accumulated list of bodies in the current system (Scan events) let scans = $state([] as Scan[]); + let signals = $state([] as FSSBodySignals[]); + + const filterImportantScans = (scans: Scan[], signals: FSSBodySignals[]) => { + return [] as Scan[]; + }; + + const importantScans = $derived(filterImportantScans(scans, signals)); const targetEvents = ["Scan", "FSSScanBaryCenter", "FSSDiscoveryScan"]; @@ -59,11 +67,17 @@ case "High metal content": case "High metal content body": return "HMC"; + case "Metal rich body": + return "MRB"; case "Sudarsky class I gas giant": case "Sudarsky class II gas giant": case "Sudarsky class III gas giant": case "Sudarsky class IV gas giant": return "GAS"; + case "Icy body": + return "ICE"; + case "Rocky body": + return "ROC"; default: return planetClass; } diff --git a/Pulsar/WebApp/src/types/api/Signals.ts b/Pulsar/WebApp/src/types/api/Signals.ts new file mode 100644 index 0000000..beb28f3 --- /dev/null +++ b/Pulsar/WebApp/src/types/api/Signals.ts @@ -0,0 +1,28 @@ +import type JournalBase from "./JournalBase"; + +export interface Signal { + type: string; + type_Localised: string; + count: number; +} + +export interface GenusType { + Genus: string; + Genus_Localised: string; +} + +interface BodySignalBase extends JournalBase { + SystemAddress: bigint; + BodyName: string; + BodyID: bigint; + Signals: Signal[]; + Genuses: GenusType[]; +} + +export interface SAASignalsFound extends BodySignalBase { + event: "SAASignalsFound"; +} + +export interface FSSBodySignals extends BodySignalBase { + event: "FSSBodySignals"; +} diff --git a/Pulsar/WebApp/svelte.config.js b/Pulsar/WebApp/svelte.config.js index 78a97fe..96e1e80 100644 --- a/Pulsar/WebApp/svelte.config.js +++ b/Pulsar/WebApp/svelte.config.js @@ -11,8 +11,8 @@ const config = { // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. // If your environment is not supported or you settled on a specific environment, switch out the adapter. // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() - } + adapter: adapter(), + }, }; export default config; diff --git a/README.md b/README.md index 1428377..ee2844a 100644 --- a/README.md +++ b/README.md @@ -4,34 +4,53 @@ A Work In Progress Application For Presenting Game Data In Realtime From Elite D A Cross Platform Fork of Elite Observatory Core. +## WIP Preview + ![Preview](https://s3.amazonaws.com/i.snag.gy/R73z9W.jpg) + ## Planned Feature - - [ ] Read the Journal - - [x] Read Status File + - [x] Read & Parse the Journals + - [x] Read Extra Files - [ ] Show Journal information ( Current Ship, Station, etc. ) - - [ ] Realtime API (Events, with extended updates) - - [ ] Realtime Journal Updates + - [ ] Current Ship/Station/NavRoute/Jumps + - [x] Realtime API (Events) + - [ ] Extended Updates API (include relevant data with events) + - [x] Realtime Journal Updates - [ ] Multiple Commanders - [ ] Cached Journal Data (in-memory SQL, enabled extended updates) - [ ] !System Exploration Value + - [ ] Custom Criteria (e.g. "Has Water World", "more than 400Kcr Scan value") - [ ] !System Exobiology Value - - [ ] !Exobiology Scan info (+[Show Req. Disatance](https://github.com/EDCD/EDDI/blob/e28ef64a1d41c1e39485863aa362d207e8d36834/Utilities/Functions.cs#L128C1-L152C10) for next scan) + - [ ] !Exobiology Scan info (+[Show Req. Distance](https://github.com/EDCD/EDDI/blob/e28ef64a1d41c1e39485863aa362d207e8d36834/Utilities/Functions.cs#L128C1-L152C10) for next scan) + - [ ] Custom Criteria (e.g. "Stratum Tectonicas", "less than 500m distance per scan", "more than 1Mcr Scan value") - [ ] !Fuel/Jump Warning - - [ ] Material Tracking (Flag planets with materials, set goals, closest trader) [e.g.](https://github.com/jixxed/ed-odyssey-materials-helper) + - [x] Fuel Scoop Estimate Time Remaining + - [ ] Material Tracking (Flag planets with materials, set goals (Mat#, not modules), closest trader) [e.g.](https://github.com/jixxed/ed-odyssey-materials-helper) - [ ] Custom Sounds (on user-defined Events) - [ ] Mission Targets [Mission Stack Viewer](https://github.com/kaivalagi/EDMissionStackViewer) - [ ] Commodities Targets/Alerts (Commodity Above/Below value at current station) - - [ ] !Outfitting Targets (does this station have wanted parts for build) + - [ ] !Outfitting Targets (does this station have wanted parts for a build) + - [ ] Export to EDSY/Coriolis - [ ] CAPI Integration - [ ] !EDDN Submission - [ ] Must be easilty disableable for sneaky business - [ ] IGAU Submission - [ ] Plugin System - [ ] !Overlay + - [ ] !Linux (DXVK/Vulkan) [imgoverlay](https://github.com/nowrep/imgoverlay) + - [ ] Windows (DirectX) [Overlay.NET](https://github.com/lolp1/Overlay.NET/) - [ ] Docking Hint ![like this](https://i.imgur.com/VYGzxYB.jpg) + - [ ] Biology Value & Scan Distance + - [ ] Fuel Scoop Estimate Time Remaining + - [ ] Custom Criteria - [ ] Tray Icon - [ ] Multiple Windows/Device Support - + - [ ] Integrate ObservatoryCore Plugins: + - [ ] https://github.com/mcmuttons/GeoPredictor + +Key: +! = priority + ## How To Use TODO: make easy diff --git a/TestProject1/GlobalUsings.cs b/TestProject1/GlobalUsings.cs new file mode 100644 index 0000000..cefced4 --- /dev/null +++ b/TestProject1/GlobalUsings.cs @@ -0,0 +1 @@ +global using NUnit.Framework; \ No newline at end of file diff --git a/TestProject1/TestProject1.csproj b/TestProject1/TestProject1.csproj new file mode 100644 index 0000000..31bfb18 --- /dev/null +++ b/TestProject1/TestProject1.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + + + + diff --git a/TestProject1/UnitTest1.cs b/TestProject1/UnitTest1.cs new file mode 100644 index 0000000..29d941e --- /dev/null +++ b/TestProject1/UnitTest1.cs @@ -0,0 +1,30 @@ +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace TestProject1; + +public class Tests +{ + [JsonPolymorphic(TypeDiscriminatorPropertyName = "event")] + [JsonDerivedType(typeof(ChildEvent), "child")] + public abstract class EventBase + { + [JsonPropertyName("timestamp")] public DateTimeOffset Timestamp { get; init; } + + [JsonPropertyName("event")] public string Event { get; set; } + } + + public class ChildEvent : EventBase; + + [Test] + public void Test() + { + var json = """ + { "event": "child", "timestamp":"2024-05-20T12:36:10Z" } + """; + + var obj = JsonSerializer.Deserialize(json)!; + + Console.WriteLine(obj.Event); // "" + } +} \ No newline at end of file