Soul s1 fixes: one compound sale path, tests for TrySellPart, Consolidate, pickup, Split and sale rounding, honest sell label

TrySell refuses a compound (it would pay a whole stack for one unit); TrySellPart is the one path and is pinned across two
bays, for an absent stack and for the floor. The Sell label for a compound reads up to the whole-stack price.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-11-27 22:28:11 +01:00
commit fb7c955bb8
3 changed files with 151 additions and 5 deletions

View file

@ -252,7 +252,8 @@ public class TradeMenu : MonoBehaviour
if (_selling)
{
ContextMenu.Clear();
ContextMenu.AddOption($"Sell ({StationServices.SellPrice(GameManager.ItemManager, i.item):N0})", () => Sell(i.item));
// A compound stack sells only the units the station's bays take: its price is the most it can pay.
ContextMenu.AddOption($"Sell ({(i.item is CompoundCommodity ? "up to " : "")}{StationServices.SellPrice(GameManager.ItemManager, i.item):N0})", () => Sell(i.item));
ContextMenu.Show();
}
else if (i.item is ICommodityStack)