better format cargo selling

This commit is contained in:
Florian Stinglmayr 2022-01-21 20:47:37 +01:00
parent 8f40c1d75e
commit d0bd8ce711

View File

@ -21,9 +21,20 @@ namespace EliteBGS.BGS {
}
foreach (MarketSellEntry sell in sold) {
string cargo;
if (!string.IsNullOrEmpty(sell.TypeLocalised)) {
cargo = sell.TypeLocalised;
} else {
cargo = sell.Type;
if (cargo.Length >= 2) {
cargo = cargo[0].ToString().ToUpper() + cargo.Substring(1);
}
}
builder.AppendFormat("Sold {0} {1} to the {2}",
sell.Count,
sell.Type,
cargo,
sell.BlackMarket ? "Black Market" : "Commodity Market"
);