feat: GM characters, reveals, who-sees-it and seen_by (#75)

Server: GM token frames gain the additive, GM-only seen_by:[player ids],
computed from each player's existing sight (PlayerVision.visibleTo) with
no extra polygon pass. Leakcheck BannedAlways bans seen_by; a seenBy
fault build is caught as exactly WALLDATA. proto stays 2 (6.2 additive).

Client: new cast slice parses character/character_gone/encountered frames
and seen_by; gmcast panel adds character create/rename/assign/remove,
reveal to one/all, encountered forget (grey entries only) and the
who-sees-it list (0/100 in M4). Mounted beside the #74 admin panel.

Docs: DESIGN 5.9/6.1/6.2/7.4 record the round-1 shape and the no-bump
call. Gates: devbox run test, client-test, e2e green; bench recorded.
This commit is contained in:
2026-11-21 01:04:10 +01:00
parent 429f023c62
commit 0323fbd2ae
12 changed files with 1234 additions and 16 deletions
+90
View File
@@ -334,3 +334,93 @@ body {
#lists li.grey .entry-name {
color: #8f8f8f;
}
/* GM cast panels (T12, #75): characters, reveals, encountered and who-sees-it, below the #74
panel in the same right-hand column. Same secret rules: hidden and cleared unless GM + live. */
#gm-cast {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 10px;
padding: 10px;
border-radius: 8px;
background: rgb(10 10 12 / 88%);
border: 1px solid #333;
pointer-events: auto;
font: 12px/1.4 ui-monospace, monospace;
}
#gm-cast h3,
#gm-cast h4 {
margin: 0;
font-weight: 600;
}
#gm-cast h3 {
font-size: 12px;
opacity: 0.8;
}
#gm-cast ul {
display: flex;
flex-direction: column;
gap: 4px;
margin: 6px 0;
padding: 0;
list-style: none;
}
#gm-cast li {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px;
padding: 4px;
border-radius: 4px;
background: rgb(255 255 255 / 4%);
}
#gm-cast button {
font: inherit;
padding: 2px 6px;
border-radius: 4px;
border: 1px solid #666;
background: #222;
color: inherit;
}
#gm-cast input,
#gm-cast select {
font: inherit;
padding: 3px 5px;
border-radius: 4px;
border: 1px solid #555;
background: #111;
color: inherit;
width: 100%;
box-sizing: border-box;
}
#gm-character-create,
#gm-cast form {
display: flex;
flex-direction: column;
gap: 4px;
margin: 6px 0;
}
#gm-cast label {
opacity: 0.7;
}
#gm-character-status,
#gm-encountered-status,
#gm-seen-hint {
margin: 4px 0 0;
word-break: break-word;
color: #e3b341;
}
#gm-seen-hint {
opacity: 0.7;
}