feat(bridge): Dangerous Treasures on protocol 14 (PLAN_REDESIGNS §14.3.4) #38

Merged
whitlocktech merged 1 commits from feat/dangerous-treasures into edge 2026-10-15 07:05:04 -05:00

1 Commits

Author SHA1 Message Date
72f51c3d9e feat(bridge): Dangerous Treasures on protocol 14 (PLAN_REDESIGNS §14.3.4)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 14s
Stage 5 of the §14.3 integration plan (docs rust-link/PROTOCOL.md §20.8).

- Three events from DT's own hooks: dt.started { x, z, key? },
  dt.won { steamId, name, invaders (max 32), invaderCount, x, z } and
  dt.ended { x, z }. None while the world is not live; a win still counts.
- The start hook fires inside the call that opens the chest, so the key a
  dt.start is running joins its start exactly, not by a ten-second window.
- dt.start { key, level 0-2 } runs `dtevent <level>` through
  ConsoleSystem.Run and answers dt.opened { key, level, repeat, x, z }. A key
  already answered is answered again and opens nothing (kept seven days in
  dt-starts.json). Refusals: malformed, bad-level, dt-missing,
  console-unavailable (D363), dt-not-ready (nothing opened, DT's own "Manual
  Event Failed" reply, under fifteen minutes since DT loaded, D365),
  dt-no-spot (after), refused (anything else DT said).
- The tally gains treasuresWon (Treasure Hunter, D375); map.live's world gains
  kind "treasure" for each running chest, seeded at load from DT's chests in
  the world (DT has no API that lists them).
- Hello's integrations gain dangerousTreasures, sent again on DT's load and
  unload. rg.world prints dangerousTreasures, treasures, dtStarts and
  dtWarmingUp. README lists Dangerous Treasures.

checkPlugin: 81 hooks, every one void and listed; 18 tests. Compiled and
loaded on both rigs (Rust 25902425, Oxide 2.0.7830, Carbon 2.0.262);
rg.world read dangerousTreasures=False treasures=0, then both went back on
the protocol-13 bridge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-15 06:45:25 -05:00