Credibility pass: the accretion sanded smooth
Blind reviews over d2b40ec..HEAD (engine / web / server+deploy). Orphaned doc comments rejoined their functions; the swap-meet tradables collapsed from four pasted deriveds to one (killing the "the's treasure" label); FEAR's aura and banner now share the engine's own dreadDistance; the long-press peek got one home; rulebook.ts stopped wearing JSON quotes; process-named tests and war-story comments now state the constraints they pin; the protocol doc caught up to its handlers; verify-ledgers.sh can actually count failures; the runbook learned about the determinism gate and the nightly backups. No behavior changes — 255 tests and all 48 production ledgers replay identically. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
3445d12206
commit
6adcbe23b5
@@ -1,11 +1,17 @@
|
||||
<script lang="ts" module>
|
||||
/** The color states a door can wear (a wall wears none). */
|
||||
export type LockState = "removed" | "jammed" | "held" | "ajar";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { holdToPeek } from "./peek";
|
||||
// A wall or door on an edge, exactly as the board draws it. Wall-segment
|
||||
// effects (locks picked, jammed, removed; doors held) are color states of
|
||||
// this one glyph — the game has never used tokens for them.
|
||||
let { x, y, kind, state, lock = null, title = null, damage = 0, onpeek }: {
|
||||
x: number; y: number; kind: "V" | "H";
|
||||
state: "wall" | "door";
|
||||
lock?: "removed" | "jammed" | "held" | "ajar" | null;
|
||||
lock?: LockState | null;
|
||||
title?: string | null;
|
||||
/** Battle damage taken so far (walls fall at 20, doors at 15). */
|
||||
damage?: number;
|
||||
@@ -23,16 +29,7 @@
|
||||
: `${needed} points to destroy`);
|
||||
const tip = $derived(`${title ?? (state === "door" ? "a locked door" : "a wall")} — ${hp}`);
|
||||
|
||||
// Press-and-hold peeks the segment, mirroring the board's cell gesture.
|
||||
let timer: ReturnType<typeof setTimeout> | null = null;
|
||||
function press() {
|
||||
if (!onpeek) return;
|
||||
timer = setTimeout(() => onpeek?.(tip), 450);
|
||||
}
|
||||
function release() {
|
||||
if (timer) clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
const { press, release } = holdToPeek(() => onpeek?.(tip));
|
||||
</script>
|
||||
|
||||
{#if kind === "V"}
|
||||
|
||||
Reference in New Issue
Block a user