using System.Text; using System.Linq; using EDJournal; namespace NonaBGS.BGS { public class SellCargo : LogEntry { public override string ToString() { StringBuilder builder = new StringBuilder(); var sold = Entries.OfType().ToArray(); if (sold == null || sold.Length == 0) { return builder.ToString(); } foreach (MarketSellEntry sell in sold) { builder.AppendFormat("Sold {0} {1} to the {2}\n", sell.Count, sell.Type, sell.BlackMarket ? "Black Market" : "Commodity Market" ); } return builder.ToString().Trim(); } /// /// Selling resources to a market only helps the controlling faction /// public override bool OnlyControllingFaction => true; } }