diff --git a/Entry.cs b/Entry.cs index 43f7504..3e840e4 100644 --- a/Entry.cs +++ b/Entry.cs @@ -29,6 +29,7 @@ namespace EDJournal { { Events.MissionRedirected, typeof(MissionRedirectedEntry) }, { Events.MultiSellExplorationData, typeof(MultiSellExplorationDataEntry) }, { Events.RedeemVoucher, typeof(RedeemVoucherEntry) }, + { Events.SellExplorationData, typeof(SellExplorationDataEntry) }, { Events.SellMicroResources, typeof(SellMicroResourcesEntry) }, { Events.ShieldState, typeof(ShieldStateEntry) }, { Events.ShipTargeted, typeof(ShipTargetedEntry) }, diff --git a/Events.cs b/Events.cs index de3a2fd..87c622f 100644 --- a/Events.cs +++ b/Events.cs @@ -18,6 +18,7 @@ public static readonly string MissionRedirected = "MissionRedirected"; public static readonly string MultiSellExplorationData = "MultiSellExplorationData"; public static readonly string RedeemVoucher = "RedeemVoucher"; + public static readonly string SellExplorationData = "SellExplorationData"; public static readonly string SellMicroResources = "SellMicroResources"; public static readonly string ShieldState = "ShieldState"; public static readonly string ShipTargeted = "ShipTargeted"; diff --git a/SellExplorationDataEntry.cs b/SellExplorationDataEntry.cs new file mode 100644 index 0000000..683fefb --- /dev/null +++ b/SellExplorationDataEntry.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; +using Newtonsoft.Json.Linq; +using System.Linq; + +namespace EDJournal { + public class SellExplorationDataEntry : Entry { + private List systems = new List(); + private List discovered = new List(); + public long BaseValue { get; set; } + public long Bonus { get; set; } + public long TotalEarnings { get; set; } + + public List Systems => systems; + public List Discovered => discovered; + + protected override void Initialise() { + BaseValue = JSON.Value("BaseValue") ?? 0; + Bonus = JSON.Value("Bonus") ?? 0; + TotalEarnings = JSON.Value("TotalEarnings") ?? 0; + + var sys = JSON.Value("Systems"); + if (sys != null) { + systems = sys.Select(x => x.ToString()).ToList(); + } + + var dis = JSON.Value("Discovered"); + if (dis != null) { + discovered = dis.Select(x => x.ToString()).ToList(); + } + } + } +} diff --git a/edjournal.csproj b/edjournal.csproj index eb5cd49..c62035c 100644 --- a/edjournal.csproj +++ b/edjournal.csproj @@ -68,6 +68,7 @@ +