Shop amount buttons + 99 stacks (27.11.2026, Claude, owner request)
Janari: picking an item (e.g. potions) and pressing "Buy Selected" lost the selection, so buying many was tedious. Wanted Buy 1 that can be pressed again, plus 5 / 10 / fill stack / full stack options, clear layout. Later the same day: potions, ores and ingots stack to 99.
What changed
Scripts/Player/Shop.gdmiddle column: one big button + a 2x2 grid of the selected side.- Buy side:
Buy 1 6G| gridBuy 5,Buy 10,Fill stack xN(tops up your own unfinished stack),Buy stack x99. Each shows its total price on the second line. - Sell side:
Sell 1 3G| gridSell 5,Sell 10,Sell stack xN,Sell all xN(all stacks of that item). Sell 5/10 take the selected stack first, then other stacks. - Equipment (not stackable): only the big x1 button.
- Buttons that cannot be done (not enough gold / bag space / items) are greyed with a tooltip reason. Buy 1 stays pressable and explains in the status line.
- Selection stays after a trade. After a sale the same stack is reselected (by uid), else another stack of the same stackable item, else nothing (never jumps to another equipment piece).
- Details show "In your bag: N (stack of 99)"; inventory rows shortened to "(x9) - 3G ea".
Scripts/Services/ShopTransactionService.gd:buy_item(..., quantity := 1)all-or-nothing (gold and bag room checked for the whole amount, one save); newsell_quantity,get_buy_room,get_fill_stack_amount,get_owned_total.sell_itemunchanged. Command shape stays (category, item_id, quantity) like the online shop request; online code untouched.- Stack sizes 9 -> 99: all 18 potions (
Lists/Consumables.gd), 5 ingots (6000-6004) and 5 ores/raw (5000-5004: Iron Ore, Gold Ore, Coal, Copper Ore, Limestone) inLists/Ingredients.gd. Souls, figurine/bell, loot boxes, backpacks stay 9. Scripts/Player/Inventory.gdload:normalize_loaded_inventoryraises a saved stack's max_stack to the list value and joins old small stacks (merge_loaded_stacks); equipped potion uids follow the merged stack (merged_stack_uids,find_loaded_item_by_uid).
Evidence
Scripts/Build/GameChecks/game_check_shop_amounts.gd (run_one_game_check.ps1, test profile): 29/29 PASS incl. repeat Buy 1/Sell 1, every amount button, gold math, short of gold, full bag, cross-stack sell, old-save join 9+9+4 -> 22, equipped uid follow. Screenshots: test-results/game_checks/20261127_171603_game_check_shop_amounts/. game_check_forge_drops shop part still PASS. Not checked: older VerifyNative* shop verifiers (not rerun); online shop UI.
Rollback
Originals: D:/WieldHavenBackups/archive/shop_quantity_buttons_20261127/ (Shop.gd, ShopTransactionService.gd, Inventory.gd, Consumables.gd, Ingredients.gd).