wip(0.S2): migrate - a var nothing writes becomes a let; a state is keyed by its module, directory or program, so every program's plan agrees; paths normalized; program states named SceneDemoState / scene_demo_st; the LSP reads state, mut and entry/handler parameters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3eda72e8c2
commit
5ffe50ed02
463 changed files with 72045 additions and 67421 deletions
|
|
@ -1,47 +1,47 @@
|
|||
# where.ludic - who and where each player is; slot 0 answers through SessionLocal, live
|
||||
export function ply_pid(session_st: SessionState, p: int) -> int {
|
||||
if p <= 0 or not ply_on(session_st, p) { return 0 }
|
||||
return session_st.session__slot[p].pid
|
||||
export function ply_pid(p: int) -> int {
|
||||
if p <= 0 or not ply_on(p) { return 0 }
|
||||
return session__slot[p].pid
|
||||
}
|
||||
|
||||
export function ply_name(session_st: SessionState, p: int) -> string {
|
||||
export function ply_name(p: int) -> string {
|
||||
if p == 0 { return SessionLocal.name() }
|
||||
if not ply_on(session_st, p) { return "" }
|
||||
return session_st.session__slot[p].name
|
||||
if not ply_on(p) { return "" }
|
||||
return session__slot[p].name
|
||||
}
|
||||
|
||||
export function ply_x(session_st: SessionState, p: int) -> float {
|
||||
export function ply_x(p: int) -> float {
|
||||
if p == 0 { return SessionLocal.x() }
|
||||
return session_st.session__slot[p].x
|
||||
return session__slot[p].x
|
||||
}
|
||||
|
||||
export function ply_y(session_st: SessionState, p: int) -> float {
|
||||
export function ply_y(p: int) -> float {
|
||||
if p == 0 { return SessionLocal.y() }
|
||||
return session_st.session__slot[p].y
|
||||
return session__slot[p].y
|
||||
}
|
||||
|
||||
export function ply_z(session_st: SessionState, p: int) -> float {
|
||||
export function ply_z(p: int) -> float {
|
||||
if p == 0 { return SessionLocal.z() }
|
||||
return session_st.session__slot[p].z
|
||||
return session__slot[p].z
|
||||
}
|
||||
|
||||
export function ply_yaw(session_st: SessionState, p: int) -> float {
|
||||
export function ply_yaw(p: int) -> float {
|
||||
if p == 0 { return SessionLocal.yaw() }
|
||||
return session_st.session__slot[p].yaw
|
||||
return session__slot[p].yaw
|
||||
}
|
||||
|
||||
export function ply_speed(session_st: SessionState, p: int) -> float {
|
||||
export function ply_speed(p: int) -> float {
|
||||
if p == 0 { return SessionLocal.speed() }
|
||||
return session_st.session__slot[p].speed
|
||||
return session__slot[p].speed
|
||||
}
|
||||
|
||||
# how much a player's rest speeds the clock: their seat's or the ground's, 1 on their feet
|
||||
export function ply_rest(session_st: SessionState, p: int) -> float {
|
||||
export function ply_rest(p: int) -> float {
|
||||
if p == 0 { return SessionLocal.rest() }
|
||||
return session_st.session__slot[p].rest
|
||||
return session__slot[p].rest
|
||||
}
|
||||
|
||||
export function ply_sleeping(session_st: SessionState, p: int) -> bool {
|
||||
if p == 0 { return session_st.session__me_sleeping }
|
||||
return ply_on(session_st, p) and session_st.session__slot[p].sleeping
|
||||
export function ply_sleeping(p: int) -> bool {
|
||||
if p == 0 { return session__me_sleeping }
|
||||
return ply_on(p) and session__slot[p].sleeping
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue