ludic.base: a queue's fact records come round again (q_rec / q_ring_add), used by effects, clock, wallet, weather, tracks, needs, fire, settings, update, steps, crafting, shop, gear, hints, session and photo instead of a new record per fact; the minimap's marks cleared and rubbed out in place, its scale steps without a list; the clock's dice seeded again, not made again; once-per-join, per-save and pool-miss paths declared
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5be2422c84
commit
d9612ba2a6
31 changed files with 215 additions and 25 deletions
|
|
@ -28,6 +28,7 @@ export function ply_join(session_st: mut SessionState, pid: int) -> int {
|
|||
if pid <= 0 { return -1 } # 0 is this machine's player
|
||||
for p in 1 .. PLY_MAX {
|
||||
if session_st.session__slot[p].on { continue }
|
||||
@alloc_ok("once per player joining: their slot's record")
|
||||
let r = new PartyMember
|
||||
r.on = true
|
||||
r.pid = pid
|
||||
|
|
|
|||
|
|
@ -83,11 +83,21 @@ export function ses_facts(session_st: SessionState) -> Queue<SessionFact> {
|
|||
}
|
||||
|
||||
function session__fact(session_st: SessionState, what: int, slot: int, pid: int) -> SessionFact {
|
||||
let f = new SessionFact
|
||||
var f = q_rec(ses_facts(session_st))
|
||||
if f == null {
|
||||
@alloc_ok("past the ring: more of these in a frame than its records, then kept in it")
|
||||
f = new SessionFact
|
||||
q_ring_add(ses_facts(session_st), f)
|
||||
}
|
||||
f.what = what
|
||||
f.slot = slot
|
||||
f.pid = pid
|
||||
f.role = session_st.session__role
|
||||
f.id = 0
|
||||
f.kind = 0
|
||||
f.param = 0
|
||||
f.yes = false
|
||||
f.text = ""
|
||||
q_push(ses_facts(session_st), f)
|
||||
return f
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue