EliteBGS/BGS/SellMicroResources.cs

28 lines
760 B
C#
Raw Permalink Normal View History

using System.Linq;
2021-08-25 16:36:57 +02:00
using EDJournal;
2021-07-09 11:03:30 +02:00
2021-11-10 21:24:39 +01:00
namespace EliteBGS.BGS {
2021-07-09 11:03:30 +02:00
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);
}
2021-07-09 11:03:30 +02:00
public override string ToString() {
2021-08-01 15:01:33 +02:00
return string.Format("Sell Micro Resources: {0}", Credits.FormatCredits(TotalSum));
2021-07-09 11:03:30 +02:00
}
public override bool OnlyControllingFaction => true;
2021-07-09 11:03:30 +02:00
}
}