39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Globalization;
|
|
using System.Threading.Tasks;
|
|
using NonaBGS.Journal;
|
|
|
|
namespace NonaBGS.BGS {
|
|
public class Cartographics : LogEntry {
|
|
public Cartographics(MultiSellExplorationDataEntry e, string current_system, string current_station) {
|
|
this.Entries.Add(e);
|
|
this.System = current_system;
|
|
this.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;
|
|
}
|
|
}
|