EliteBGS/BGS/Cartographics.cs

33 lines
999 B
C#

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();
}
/// <summary>
/// Cartographics only help the controlling faction.
/// </summary>
public override bool OnlyControllingFaction => true;
}
}