Compare commits

..

2 Commits

3 changed files with 42 additions and 7 deletions

View File

@ -8,13 +8,34 @@ namespace EliteBGS.BGS {
Entries.Add(e); Entries.Add(e);
} }
public int TotalSum { public Cartographics(SellExplorationDataEntry e) {
Entries.Add(e);
}
public override int CompareTo(LogEntry other) {
if (other == null || other.GetType() != typeof(Cartographics)) {
return -1;
}
Cartographics b = other as Cartographics;
if (b.System == System && b.Faction == Faction && b.Station == Station) {
return 0;
}
return -1;
}
public long TotalSum {
get { get {
return (from entry in Entries /* add multi sell and normal ones together */
where entry.Is(Events.MultiSellExplorationData) long total =
select (entry as MultiSellExplorationDataEntry).TotalEarnings) Entries.OfType<MultiSellExplorationDataEntry>()
.Sum() .Sum(x => x.TotalEarnings)
+
Entries.OfType<SellExplorationDataEntry>()
.Sum(x => x.TotalEarnings)
; ;
return total;
} }
} }

View File

@ -36,6 +36,7 @@ namespace EliteBGS.BGS {
e.Is(Events.FSDJump) || e.Is(Events.FSDJump) ||
e.Is(Events.Location) || e.Is(Events.Location) ||
e.Is(Events.MultiSellExplorationData) || e.Is(Events.MultiSellExplorationData) ||
e.Is(Events.SellExplorationData) ||
e.Is(Events.SellMicroResources) || e.Is(Events.SellMicroResources) ||
e.Is(Events.RedeemVoucher) || e.Is(Events.RedeemVoucher) ||
e.Is(Events.FactionKillBond) || e.Is(Events.FactionKillBond) ||
@ -139,6 +140,15 @@ namespace EliteBGS.BGS {
/* Mission failed should be collated if they are in the same system/station /* Mission failed should be collated if they are in the same system/station
*/ */
collate = true; collate = true;
} else if (e.Is(Events.SellExplorationData)) {
results.Add(new Cartographics(e as SellExplorationDataEntry) {
System = current_system,
Station = current_station,
Faction = controlling_faction,
});
/* colate single cartographic selling into one */
collate = true;
} else if (e.Is(Events.MultiSellExplorationData)) { } else if (e.Is(Events.MultiSellExplorationData)) {
/* For multi-sell-exploraton-data only the controlling faction of the station sold to matters. /* For multi-sell-exploraton-data only the controlling faction of the station sold to matters.
*/ */
@ -147,6 +157,8 @@ namespace EliteBGS.BGS {
Station = current_station, Station = current_station,
Faction = controlling_faction Faction = controlling_faction
}); });
collate = true;
} else if (e.Is(Events.RedeemVoucher)) { } else if (e.Is(Events.RedeemVoucher)) {
/* Same for selling combat vouchers. Only the current controlling faction matters here. /* Same for selling combat vouchers. Only the current controlling faction matters here.
*/ */

View File

@ -1,10 +1,12 @@
# EliteBGS changelog # EliteBGS changelog
## 0.1.0-beta6 on ??.??.2022 ## 0.1.0-beta6 on 22.01.2022
* Month names should now always be in English in the NONA log format. * Month names should now always be in English in the NONA log format.
* Add influence support (by secondary mission objectives) to the log format. * Add influence support (by secondary mission objectives) to the log format.
* Remember last used discord log template. * Remember last used discord log template.
* Add support for SellExplorationData journal entry.
* Improve credit formatting.
## 0.1.0-beta5 on 21.01.2022 ## 0.1.0-beta5 on 21.01.2022