using System.Linq; using System.Text; using EDJournal; namespace EliteBGS.BGS { public class Cartographics : LogEntry { public Cartographics(MultiSellExplorationDataEntry e) { Entries.Add(e); } public int TotalSum { get { return (from entry in Entries where entry.Is(Events.MultiSellExplorationData) select (entry as MultiSellExplorationDataEntry).TotalEarnings) .Sum() ; } } public override string ToString() { StringBuilder builder = new StringBuilder(); builder.AppendFormat("Sold {0} worth of Cartographics Data", Credits.FormatCredits(TotalSum)); return builder.ToString(); } /// /// Cartographics only help the controlling faction. /// public override bool OnlyControllingFaction => true; } }