allow a choice whether to collate entries
This commit is contained in:
@@ -49,7 +49,7 @@ namespace EliteBGS.BGS {
|
||||
;
|
||||
}
|
||||
|
||||
public void Scan(PlayerJournal journal, DateTime start, DateTime end) {
|
||||
public void Scan(PlayerJournal journal, DateTime start, DateTime end, bool CollateEntries = true) {
|
||||
/* Log files only get rotated if you restart the game client. This means that there might
|
||||
* be - say - entries from the 4th of May in the file with a timestamp of 3rd of May. This
|
||||
* happens if you happen to play a session late into the night.
|
||||
@@ -72,10 +72,10 @@ namespace EliteBGS.BGS {
|
||||
.Where(e => e.Timestamp >= start && e.Timestamp < actualend)
|
||||
.ToList()
|
||||
;
|
||||
Scan(entries);
|
||||
Scan(entries, CollateEntries);
|
||||
}
|
||||
|
||||
public void Scan(List<Entry> entries) {
|
||||
public void Scan(List<Entry> entries, bool CollateEntries = true) {
|
||||
if (entries.Count <= 0) {
|
||||
return;
|
||||
}
|
||||
@@ -198,7 +198,7 @@ namespace EliteBGS.BGS {
|
||||
System = current_system,
|
||||
Faction = faction,
|
||||
});
|
||||
collate = true;
|
||||
collate = CollateEntries;
|
||||
} else if (e.Is(Events.MissionCompleted)) {
|
||||
MissionCompletedEntry completed = e as MissionCompletedEntry;
|
||||
MissionAcceptedEntry accepted = null;
|
||||
@@ -411,7 +411,7 @@ namespace EliteBGS.BGS {
|
||||
|
||||
/* Mission failed should be collated if they are in the same system/station
|
||||
*/
|
||||
collate = true;
|
||||
collate = CollateEntries;
|
||||
} else if (e.Is(Events.SellExplorationData)) {
|
||||
results.Add(new Cartographics(e as SellExplorationDataEntry) {
|
||||
System = current_system,
|
||||
@@ -420,7 +420,7 @@ namespace EliteBGS.BGS {
|
||||
});
|
||||
|
||||
/* colate single cartographic selling into one */
|
||||
collate = true;
|
||||
collate = CollateEntries;
|
||||
} else if (e.Is(Events.SellOrganicData)) {
|
||||
/* organic data sold to Vista Genomics */
|
||||
results.Add(new OrganicData(e as SellOrganicDataEntry) {
|
||||
@@ -429,7 +429,7 @@ namespace EliteBGS.BGS {
|
||||
Faction = controlling_faction,
|
||||
});
|
||||
|
||||
collate = true;
|
||||
collate = CollateEntries;
|
||||
} else if (e.Is(Events.MultiSellExplorationData)) {
|
||||
/* For multi-sell-exploraton-data only the controlling faction of the station sold to matters.
|
||||
*/
|
||||
@@ -439,7 +439,7 @@ namespace EliteBGS.BGS {
|
||||
Faction = controlling_faction
|
||||
});
|
||||
|
||||
collate = true;
|
||||
collate = CollateEntries;
|
||||
} else if (e.Is(Events.RedeemVoucher)) {
|
||||
RedeemVoucherEntry voucher = e as RedeemVoucherEntry;
|
||||
List<Faction> current_factions = new List<Faction>();
|
||||
@@ -470,7 +470,7 @@ namespace EliteBGS.BGS {
|
||||
});
|
||||
}
|
||||
|
||||
collate = true;
|
||||
collate = CollateEntries;
|
||||
} else if (e.Is(Events.SellMicroResources)) {
|
||||
results.Add(new SellMicroResources(e as SellMicroResourcesEntry) {
|
||||
Faction = controlling_faction,
|
||||
@@ -490,7 +490,7 @@ namespace EliteBGS.BGS {
|
||||
System = current_system,
|
||||
});
|
||||
|
||||
collate = true;
|
||||
collate = CollateEntries;
|
||||
} else if (e.Is(Events.SearchAndRescue)) {
|
||||
results.Add(new SearchAndRescue(e as SearchAndRescueEntry) {
|
||||
Faction = controlling_faction,
|
||||
@@ -498,7 +498,7 @@ namespace EliteBGS.BGS {
|
||||
System = current_system,
|
||||
});
|
||||
|
||||
collate = true;
|
||||
collate = CollateEntries;
|
||||
} else if (e.Is(Events.MarketSell)) {
|
||||
MarketSellEntry sell = e as MarketSellEntry;
|
||||
long profit = 0;
|
||||
|
||||
Reference in New Issue
Block a user