35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System.Linq;
|
|
using System.Text;
|
|
using EDJournal;
|
|
|
|
namespace EliteBGS.BGS {
|
|
public class Cartographics : LogEntry {
|
|
public Cartographics(MultiSellExplorationDataEntry e, string current_system, string current_station) {
|
|
Entries.Add(e);
|
|
System = current_system;
|
|
Station = current_station;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|