add better entry for MarketSell
This commit is contained in:
parent
e84d3ed808
commit
0b26303463
@ -1,11 +1,46 @@
|
|||||||
namespace EDJournal {
|
namespace EDJournal {
|
||||||
public class MarketSellEntry : Entry {
|
public class MarketSellEntry : Entry {
|
||||||
private int totalsale = 0;
|
/// <summary>
|
||||||
|
/// Total value
|
||||||
|
/// </summary>
|
||||||
|
public int TotalSale { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// How many.
|
||||||
|
/// </summary>
|
||||||
|
public int Count { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Average price paid
|
||||||
|
/// </summary>
|
||||||
|
public int AvgPricePaid { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Cargo type
|
||||||
|
/// </summary>
|
||||||
|
public string Type { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Price per unit
|
||||||
|
/// </summary>
|
||||||
|
public int SellPrice { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the goods were illegal in the target system.
|
||||||
|
/// </summary>
|
||||||
|
public bool IllegalGoods { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the goods were stolen
|
||||||
|
/// </summary>
|
||||||
|
public bool StolenGoods { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the goods were sold to the black market
|
||||||
|
/// </summary>
|
||||||
|
public bool BlackMarket { get; set; }
|
||||||
|
|
||||||
protected override void Initialise() {
|
protected override void Initialise() {
|
||||||
totalsale = JSON.Value<int>("TotalSale");
|
Type = JSON.Value<string>("Type") ?? "";
|
||||||
|
TotalSale = JSON.Value<int?>("TotalSale") ?? 0;
|
||||||
|
Count = JSON.Value<int?>("Count") ?? 0;
|
||||||
|
AvgPricePaid = JSON.Value<int?>("AvgPricePaid") ?? 0;
|
||||||
|
IllegalGoods = JSON.Value<bool?>("IllegalGoods") ?? false;
|
||||||
|
StolenGoods = JSON.Value<bool?>("StolenGoods") ?? false;
|
||||||
|
BlackMarket = JSON.Value<bool?>("BlackMarket") ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int TotalSale => totalsale;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user