EliteBGS/BGS/SellMicroResources.cs

28 lines
760 B
C#

using System.Linq;
using EDJournal;
namespace EliteBGS.BGS {
public class SellMicroResources : LogEntry {
public int TotalSum {
get {
return Entries
.Where(x => x.GetType() == typeof(SellMicroResourcesEntry))
.Sum(x => (x as SellMicroResourcesEntry).Price)
;
}
}
public SellMicroResources() { }
public SellMicroResources(SellMicroResourcesEntry e) {
Entries.Add(e);
}
public override string ToString() {
return string.Format("Sell Micro Resources: {0}", Credits.FormatCredits(TotalSum));
}
public override bool OnlyControllingFaction => true;
}
}