From d0bd8ce7115da8c43e3ea808601d949f87aad5d4 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Fri, 21 Jan 2022 20:47:37 +0100 Subject: [PATCH] better format cargo selling --- BGS/SellCargo.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/BGS/SellCargo.cs b/BGS/SellCargo.cs index 61bb1c3..fbca0c2 100644 --- a/BGS/SellCargo.cs +++ b/BGS/SellCargo.cs @@ -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" );