feat(db): typed wall storage, marker_seen and height backfill (#53)

This commit is contained in:
2026-11-19 22:03:11 +01:00
parent 6a443b4ec0
commit c1b1e9cf91
10 changed files with 551 additions and 45 deletions
+2 -1
View File
@@ -1925,7 +1925,8 @@ proc dispatch(conn: Conn, env: Envelope) {.gcsafe.} =
sceneId = app.scene.id # the request's one read (#31)
# `candidate` is built here so its `flags` copy and its record copy both die under the lock;
# `detachedJson` keeps the stored object independent of `env` (ANALYSIS 4.1).
let candidate = WallRec(a: a.get, b: b.get, kind: kind.get, open: open.get,
let candidate = WallRec(a: a.get, b: b.get, door: kind.get == wkDoor,
open: open.get, blocksSight: true, blocksMovement: true,
flags: detachedJson(flags.get))
# 5.5 SET: the new wall sticks every token its circle overlaps. The rules run on a snapshot
# taken before the write (the id is assigned by the write), and their outcome is applied only