32 lines
947 B
C#
32 lines
947 B
C#
using System.Text;
|
|
using System.Linq;
|
|
using EDJournal;
|
|
|
|
namespace EliteBGS.BGS {
|
|
public class SellCargo : LogEntry {
|
|
public override string ToString() {
|
|
StringBuilder builder = new StringBuilder();
|
|
var sold = Entries.OfType<MarketSellEntry>().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();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Selling resources to a market only helps the controlling faction
|
|
/// </summary>
|
|
public override bool OnlyControllingFaction => true;
|
|
}
|
|
}
|