edjournal/MarketSellEntry.cs

52 lines
1.8 KiB
C#
Raw Normal View History

2021-08-25 18:24:44 +02:00
namespace EDJournal {
public class MarketSellEntry : Entry {
2021-09-28 15:08:42 +02:00
/// <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>
/// Localised name of the cargo sold, may be null.
/// </summary>
public string TypeLocalised { get; set; }
/// <summary>
2021-09-28 15:08:42 +02:00
/// 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; }
2021-08-25 18:24:44 +02:00
protected override void Initialise() {
2021-09-28 15:08:42 +02:00
Type = JSON.Value<string>("Type") ?? "";
TypeLocalised = JSON.Value<string>("Type_Localised") ?? "";
2021-09-28 15:08:42 +02:00
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;
2021-08-25 18:24:44 +02:00
}
}
}