diff --git a/Entry.cs b/Entry.cs index 40b82ae..43f7504 100644 --- a/Entry.cs +++ b/Entry.cs @@ -20,6 +20,7 @@ namespace EDJournal { { Events.FSDJump, typeof(FSDJumpEntry) }, { Events.HullDamage, typeof(HullDamageEntry) }, { Events.Location, typeof(LocationEntry) }, + { Events.MarketBuy, typeof(MarketBuyEntry) }, { Events.MarketSell, typeof(MarketSellEntry) }, { Events.MissionAbandoned, typeof(MissionAbandonedEntry) }, { Events.MissionAccepted, typeof(MissionAcceptedEntry) }, diff --git a/Events.cs b/Events.cs index 09cfffb..de3a2fd 100644 --- a/Events.cs +++ b/Events.cs @@ -9,6 +9,7 @@ public static readonly string FSDJump = "FSDJump"; public static readonly string HullDamage = "HullDamage"; public static readonly string Location = "Location"; + public static readonly string MarketBuy = "MarketBuy"; public static readonly string MarketSell = "MarketSell"; public static readonly string MissionAbandoned = "MissionAbandoned"; public static readonly string MissionAccepted = "MissionAccepted"; diff --git a/MarketBuyEntry.cs b/MarketBuyEntry.cs new file mode 100644 index 0000000..93ad0aa --- /dev/null +++ b/MarketBuyEntry.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EDJournal { + public class MarketBuyEntry : Entry { + public string Type { get; set; } + public int Count { get; set; } + public int BuyPrice { get; set; } + public int TotalCost { get; set; } + + protected override void Initialise() { + Type = JSON.Value("Type") ?? ""; + Count = JSON.Value("Count") ?? 0; + BuyPrice = JSON.Value("BuyPrice") ?? 0; + TotalCost = JSON.Value("TotalCost") ?? 0; + } + } +} diff --git a/edjournal.csproj b/edjournal.csproj index 7976723..5d34b78 100644 --- a/edjournal.csproj +++ b/edjournal.csproj @@ -55,6 +55,7 @@ +