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:
parent
cd71da9330
commit
bdfe3f18fe
13 changed files with 26 additions and 12 deletions
|
|
@ -9,7 +9,10 @@ function th_spare_put(things_st: mut ThingsState, t: Thing) -> void { kept_push(
|
|||
# a record for a Thing about to be placed: the oldest spare past the lag, or a new one
|
||||
function th_record(things_st: mut ThingsState) -> Thing {
|
||||
let l = things_st.th_spare
|
||||
if len(l) - things_st.th_spare_at <= TH_SPARE_LAG { return new Thing }
|
||||
if len(l) - things_st.th_spare_at <= TH_SPARE_LAG {
|
||||
@alloc_ok("a spare miss: only until things_spare_warm's records and the removed ones come round")
|
||||
return new Thing
|
||||
}
|
||||
let t = l[things_st.th_spare_at]
|
||||
things_st.th_spare_at += 1
|
||||
if things_st.th_spare_at >= 64 { th_spare_pack(things_st) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue