fix cartographics value, use Total instead of TotalEarnings
This commit is contained in:
parent
916afb2348
commit
9f013bed38
@ -35,10 +35,10 @@ public class Cartographics : Transaction {
|
||||
/* add multi sell and normal ones together */
|
||||
long total =
|
||||
Entries.OfType<MultiSellExplorationDataEntry>()
|
||||
.Sum(x => x.TotalEarnings)
|
||||
.Sum(x => x.Total)
|
||||
+
|
||||
Entries.OfType<SellExplorationDataEntry>()
|
||||
.Sum(x => x.TotalEarnings)
|
||||
.Sum(x => x.Total)
|
||||
;
|
||||
return total;
|
||||
}
|
||||
|
@ -1,8 +1,23 @@
|
||||
namespace EDPlayerJournal.Entries;
|
||||
namespace EDPlayerJournal.Entries;
|
||||
|
||||
public class MultiSellExplorationDataEntry : Entry {
|
||||
protected override void Initialise() {
|
||||
TotalEarnings = (JSON.Value<int?>("TotalEarnings") ?? 0);
|
||||
TotalEarnings = JSON.Value<long?>("TotalEarnings") ?? 0;
|
||||
BaseValue = JSON.Value<long?>("BaseValue") ?? 0;
|
||||
Bonus = JSON.Value<long?>("Bonus") ?? 0;
|
||||
}
|
||||
|
||||
public int TotalEarnings { get; set; } = 0;
|
||||
public long Total {
|
||||
get { return BaseValue + Bonus; }
|
||||
}
|
||||
|
||||
public long BaseValue { get; set; } = 0;
|
||||
|
||||
public long Bonus { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Total Earnings are the actual earnings without bonus. So this
|
||||
/// value is BaseValue minus any percent a crew pilot takes.
|
||||
/// </summary>
|
||||
public long TotalEarnings { get; set; } = 0;
|
||||
}
|
||||
|
@ -6,8 +6,17 @@ namespace EDPlayerJournal.Entries;
|
||||
public class SellExplorationDataEntry : Entry {
|
||||
public long BaseValue { get; set; }
|
||||
public long Bonus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Total Earnings are the actual earnings without bonus. So this
|
||||
/// value is BaseValue minus any percent a crew pilot takes.
|
||||
/// </summary>
|
||||
public long TotalEarnings { get; set; }
|
||||
|
||||
public long Total {
|
||||
get { return BaseValue + Bonus; }
|
||||
}
|
||||
|
||||
public List<string> Systems { get; set; } = new List<string>();
|
||||
public List<string> Discovered { get; set; } = new List<string>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user