diff --git a/EDPlayerJournal/Entries/CapShipBondEntry.cs b/EDPlayerJournal/Entries/CapShipBondEntry.cs new file mode 100644 index 0000000..d933e29 --- /dev/null +++ b/EDPlayerJournal/Entries/CapShipBondEntry.cs @@ -0,0 +1,24 @@ +namespace EDPlayerJournal.Entries; + +public class CapShipBondEntry : Entry { + /// + /// Reward gained + /// + public ulong Reward { get; set; } = 0; + + /// + /// Victim faction, i.e. to whom the cap ship belongs + /// + public string? VictimFaction { get; set; } + + /// + /// Awarding faction. + /// + public string? AwardingFaction { get; set; } + + protected override void Initialise() { + Reward = JSON.Value("Reward") ?? 0; + VictimFaction = JSON.Value("VictimFaction"); + AwardingFaction = JSON.Value("AwardingFaction"); + } +} diff --git a/EDPlayerJournal/Entries/Entry.cs b/EDPlayerJournal/Entries/Entry.cs index 800f0e1..3266d1d 100644 --- a/EDPlayerJournal/Entries/Entry.cs +++ b/EDPlayerJournal/Entries/Entry.cs @@ -13,6 +13,7 @@ namespace EDPlayerJournal.Entries; public class Entry { private static readonly Dictionary classes = new Dictionary { { Events.Bounty, typeof(BountyEntry) }, + { Events.CapShipBond, typeof(CapShipBondEntry) }, { Events.Commander, typeof(CommanderEntry) }, { Events.CommitCrime, typeof(CommitCrimeEntry) }, { Events.Died, typeof(DiedEntry) }, diff --git a/EDPlayerJournal/Entries/Events.cs b/EDPlayerJournal/Entries/Events.cs index a555b0b..7bf0dd6 100644 --- a/EDPlayerJournal/Entries/Events.cs +++ b/EDPlayerJournal/Entries/Events.cs @@ -2,6 +2,7 @@ public class Events { public static readonly string Bounty = "Bounty"; + public static readonly string CapShipBond = "CapShipBond"; public static readonly string Commander = "Commander"; public static readonly string CommitCrime = "CommitCrime"; public static readonly string Died = "Died";