feat(walls): player markers — emission, opaque ids, storage, resync (#59)
A wall that is player_marker:true and derives window sends a player one anchor (the drawn midpoint, integer px) and an opaque per-player 12-char id once any point of its segment enters that player's vision polygon. Markers live in PlayerVision like explored, persist to marker_seen in the same derived-memory transaction, load before the first connection and resync as a full set after explored; the GM and other players never receive one. - markers.nim: emission gate, visible-extent test, id mint, anchor, marker_seen I/O. - views/main: PlayerView markers + full/diff frames, refresh sync, startup load. - markers.test.mjs: window preset, switch off, solid wall, any-part anchor, walk-away/door/lost sight, full-after-explored, per-player privacy, GM none. - leakcheck: marker allowed type + independent visible-extent oracle with a positive control (a marked window the subject sees). - restart: marked window in the fixture; marker set and marker_seen rows identical before/after SIGTERM and SIGKILL. - protocol/tviews: catalogue and frame order pin the 16th message. Retraction, re-earning and MARKER_* faults are #60. Ref #59
This commit is contained in:
+1
-1
@@ -141,7 +141,7 @@ suite "diff (6.4: only what changed)":
|
||||
var ctx = ctxOf(sceneWith(@[]), @[tok("mine", 400, 400, Pid)], @[Pid])
|
||||
var known: Known
|
||||
let first = pass(ctx, known, resync = true)
|
||||
check typesOf(first) == @["encountered", "vision", "explored", "token"]
|
||||
check typesOf(first) == @["encountered", "vision", "explored", "marker", "token"]
|
||||
check first[0]["full"].getBool # 6.3: the whole list on connect/resync
|
||||
check first[0]["set"].len == 0
|
||||
check first[2]["full"].getBool
|
||||
|
||||
Reference in New Issue
Block a user