feat(walls): windows — see-through barrier, movement follows blocks_movement (#57)

- geometry.Wall carries the stored blocks_sight/blocks_movement switches; sight asks
  blocksSight, movement and the status rules ask blocks (open door passes both).
- worldmap translates both switches; moverules only pushes on a movement barrier.
- leakcheck and the tile oracle read blocks_sight independently.
- Walls/token-details/tiles groups prove both forms, sight-through, stuck, push and
  the locked-window open refusal; existing scenes stay byte-identical.

Ref #57

# Conflicts:
#	server/geometry.nim
#	server/world.nim
#	server/worldmap.nim
#	tools/leakcheck.nim
This commit is contained in:
2026-11-19 23:09:05 +01:00
parent cc566ee16e
commit e989100f50
9 changed files with 226 additions and 36 deletions
+9 -1
View File
@@ -373,11 +373,19 @@ test('door.set: secret and locked refuse opening, closing is allowed, players ar
await gm.ws.request({ t: 'wall.update', scene, id: locked, locked: false })
await setDoor(locked, true)
// A locked opening window is still see-through, but its leaf refuses to open until unlocked;
// once the lock is cleared the same intent opens it exactly like a door (#57).
const lockedWindow = await add({ a: [10, 60], b: [100, 60], blocks_sight: false,
door: true, locked: true })
await setDoor(lockedWindow, true, 'invalid')
await gm.ws.request({ t: 'wall.update', scene, id: lockedWindow, locked: false })
await setDoor(lockedWindow, true)
const player = await createPlayer(gm.ws)
await namePlayer(s.origin, player.key, 'Dora')
const p = await openAs(s.origin, player.key)
await p.ws.waitText('hello')
for (const id of [plainDoor, secret, locked, both]) {
for (const id of [plainDoor, secret, locked, both, lockedWindow]) {
for (const open of [true, false]) {
const ack = await p.ws.request({ t: 'door.set', scene, id, open })
assert.equal(ack.ok, false, JSON.stringify(ack))