feat(walls): proto 2 typed wall record, inert geometry, derived kind (#54)
wall.add/wall.update take thickness, position, height and the eight raw switches; kind is output-only and the GM wall frames echo the full typed record. Geometry is stored but inert (0/full/centre behaviour), and the legacy kind/open wire adapter is gone. proto is bumped to 2 with the harness default, and BannedAlways gains every wall field name with a WALLDATA positive control. Tests: schema-7 migrated scene vs the same walls authored via raw switches gives byte-identical player frames, refusals and per-tile statuses. Nim 382 / Node 113 green.
This commit is contained in:
@@ -50,9 +50,9 @@ async function buildWorld(origin, gmKey) {
|
||||
await createPlayer(gm.ws)
|
||||
// A wall and a door; the door is opened (door.set is its own write path).
|
||||
const wall = await gm.ws.request({ t: 'wall.add', scene: gm.sceneId, a: [700, 0],
|
||||
b: [700, 900], kind: 'wall' })
|
||||
b: [700, 900] })
|
||||
const door = await gm.ws.request({ t: 'wall.add', scene: gm.sceneId, a: [700, 1000],
|
||||
b: [700, 1400], kind: 'door' })
|
||||
b: [700, 1400], door: true })
|
||||
assert.equal(wall.ok, true, JSON.stringify(wall))
|
||||
assert.equal(door.ok, true, JSON.stringify(door))
|
||||
assert.equal((await gm.ws.request({ t: 'door.set', scene: gm.sceneId, id: door.id,
|
||||
|
||||
Reference in New Issue
Block a user