ludic.fishing, net, clock: their dice made once and seeded again, never made again per reset; ludic.minimap's near list kept, its marks and grid declared

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 20:13:58 +03:00
parent 4bca5dfa92
commit 4fc9d2616a
6 changed files with 26 additions and 8 deletions

View file

@ -47,6 +47,7 @@ export function minimap_config(minimap_st: mut MinimapState, cells: int, cell_m:
minimap_st.mm_core_n = minimap_st.mm_cells
@alloc_ok("once per map configured: its explored grid")
minimap_st.mm_seen = new []int
@alloc_ok("once per map configured: as above")
for i in 0 .. minimap_st.mm_cells * minimap_st.mm_cells { push(minimap_st.mm_seen, 0) }
minimap_st.mm_land_n = 0
minimap_st.mm_version += 1

View file

@ -48,6 +48,7 @@ export function minimap_pin_add(minimap_st: mut MinimapState, x: float, z: float
p.icon = Math.clamp(icon, 0, minimap_st.mm_symbols - 1)
p.day = MinimapWorld.day()
p.label = label
@alloc_ok("a mark put down: kept, and the map holds at most its most")
push(minimap_st.mm_pins, p)
minimap_st.mm_last = p.icon
return len(minimap_st.mm_pins) - 1
@ -65,6 +66,7 @@ export function minimap_pin_put(minimap_st: mut MinimapState, x: float, z: float
p.colour = Math.clamp(colour, 0, minimap_st.mm_colours - 1)
p.day = day
p.label = label
@alloc_ok("a mark put down: kept, and the map holds at most its most")
push(minimap_st.mm_pins, p)
return len(minimap_st.mm_pins) - 1
}
@ -91,7 +93,7 @@ export function minimap_pins_near(minimap_st: mut MinimapState, x: float, z: flo
}
}
if best < 0 { break }
push(out, best)
kept_push(out, best)
}
return out
}