From 0b2630346340f5baf47177c8813a652430cd4134 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Tue, 28 Sep 2021 15:08:42 +0200 Subject: [PATCH] add better entry for MarketSell --- MarketSellEntry.cs | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/MarketSellEntry.cs b/MarketSellEntry.cs index df35e34..8ef41d8 100644 --- a/MarketSellEntry.cs +++ b/MarketSellEntry.cs @@ -1,11 +1,46 @@ namespace EDJournal { public class MarketSellEntry : Entry { - private int totalsale = 0; + /// + /// Total value + /// + public int TotalSale { get; set; } + /// + /// How many. + /// + public int Count { get; set; } + /// + /// Average price paid + /// + public int AvgPricePaid { get; set; } + /// + /// Cargo type + /// + public string Type { get; set; } + /// + /// Price per unit + /// + public int SellPrice { get; set; } + /// + /// Whether the goods were illegal in the target system. + /// + public bool IllegalGoods { get; set; } + /// + /// Whether the goods were stolen + /// + public bool StolenGoods { get; set; } + /// + /// Whether the goods were sold to the black market + /// + public bool BlackMarket { get; set; } protected override void Initialise() { - totalsale = JSON.Value("TotalSale"); + Type = JSON.Value("Type") ?? ""; + TotalSale = JSON.Value("TotalSale") ?? 0; + Count = JSON.Value("Count") ?? 0; + AvgPricePaid = JSON.Value("AvgPricePaid") ?? 0; + IllegalGoods = JSON.Value("IllegalGoods") ?? false; + StolenGoods = JSON.Value("StolenGoods") ?? false; + BlackMarket = JSON.Value("BlackMarket") ?? false; } - - public int TotalSale => totalsale; } }