ludic.compass, inventory, shop, base, things: the compass's lists are state defaults and push through kept_push; the pack clears in place; setup, bind and load paths say so in @alloc_ok

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 16:29:33 +03:00
parent cd71da9330
commit bdfe3f18fe
13 changed files with 26 additions and 12 deletions

View file

@ -68,9 +68,11 @@ export function shop_config_curve(shop_st: mut ShopState, buy_new: float, buy_be
shop_st.shop_sell_best = sell_best
}
@alloc_ok("at start: the vendors are bound once")
export function shop_clear_vendors(shop_st: mut ShopState) -> void { shop_st.shop_vendor_list = new []ShopVendor }
# a vendor; its number is the order added
@alloc_ok("at start: the vendors are bound once")
export function shop_add_vendor(shop_st: mut ShopState, stock: []int, buys: []int, refuses: int) -> int {
if shop_st.shop_vendor_list == null { shop_clear_vendors(shop_st) }
let v = new ShopVendor