using System.Linq; using EDPlayerJournal.Entries; namespace EDPlayerJournal.BGS; public class SellMicroResources : Transaction { public int TotalSum { get { return Entries .OfType() .Sum(x => x.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; }