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:
@@ -153,7 +153,7 @@ test('token_radius_default: a grow pushes default-radius tokens, an own radius n
|
||||
const gm = await gmConnect(s.origin, gmKey)
|
||||
// A wall 40 px above the token: clear at radius 20, overlapping at 50.
|
||||
assert.equal((await gm.ws.request({ t: 'wall.add', scene: gm.sceneId, a: [0, 440],
|
||||
b: [1000, 440], kind: 'wall' })).ok, true)
|
||||
b: [1000, 440] })).ok, true)
|
||||
const def = await gm.ws.request({ t: 'token.create', scene: gm.sceneId, kind: 'npc',
|
||||
pos: [400, 400], descriptive_name: 'a goblin',
|
||||
actual_name: 'Grib' })
|
||||
@@ -191,9 +191,9 @@ test('token_radius_default: a grow with no room on either side squeezes', async
|
||||
const gm = await gmConnect(s.origin, gmKey)
|
||||
// A corridor 60 px wide: a radius-20 token fits centred, a radius-40 token cannot fit at all.
|
||||
assert.equal((await gm.ws.request({ t: 'wall.add', scene: gm.sceneId, a: [1000, 900],
|
||||
b: [1000, 1100], kind: 'wall' })).ok, true)
|
||||
b: [1000, 1100] })).ok, true)
|
||||
assert.equal((await gm.ws.request({ t: 'wall.add', scene: gm.sceneId, a: [1060, 900],
|
||||
b: [1060, 1100], kind: 'wall' })).ok, true)
|
||||
b: [1060, 1100] })).ok, true)
|
||||
const tok = await gm.ws.request({ t: 'token.create', scene: gm.sceneId, kind: 'npc',
|
||||
pos: [1030, 1000], descriptive_name: 'a rat',
|
||||
actual_name: 'Squeak' })
|
||||
|
||||
Reference in New Issue
Block a user