ludic.things: a Thing's seats (a run of the game's seat rows, saved; a bit per seat taken, not); ludic.character: char_sit takes the seat's top and its height above the feet, char_sit_leave names where standing up goes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e84a59aeff
commit
a22b8a572b
12 changed files with 107 additions and 11 deletions
|
|
@ -29,6 +29,8 @@ function th_to_json(t: Thing) -> Val {
|
|||
sv_put_float(o, "sx", t.sx)
|
||||
sv_put_float(o, "sz", t.sz)
|
||||
sv_put_float(o, "syaw", t.syaw)
|
||||
sv_put_int(o, "seat", t.seat)
|
||||
sv_put_int(o, "seats", t.seats)
|
||||
return o
|
||||
}
|
||||
|
||||
|
|
@ -57,6 +59,8 @@ function th_from_json(things_st: mut ThingsState, o: Val) -> void {
|
|||
t.sx = sv_float(o, "sx", 0.0)
|
||||
t.sz = sv_float(o, "sz", 0.0)
|
||||
t.syaw = sv_float(o, "syaw", 0.0)
|
||||
t.seat = sv_int(o, "seat", -1)
|
||||
t.seats = sv_int(o, "seats", 0)
|
||||
let x = sv_float(o, "x", 0.0)
|
||||
let z = sv_float(o, "z", 0.0)
|
||||
let y = sv_float(o, "y", ThingsWorld.ground(x, z))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue