feat(bridge): Dangerous Treasures on protocol 14 (PLAN_REDESIGNS §14.3.4) #38
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/dangerous-treasures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stage 5 of the §14.3 integration plan. Spec: docs
rust-link/PROTOCOL.md§20.8 and §17.3 (docs PR alongside). Record:modules/rust/PLAN_REDESIGNS.md§14.3.18.Three events from DT's own hooks:
dt.started{ x, z, key? }dt.won{ steamId, name, invaders (at most 32), invaderCount, x, z }dt.ended{ x, z }None is sent while the world is not live. A win is still counted.
The key's join is exact. DT raises its start hook inside the call that opens the chest, so the key a
dt.startis running is attached to that start beforeConsoleSystem.Runreturns. The plan's "first start within ten seconds" is not needed.dt.start{ key, level }(0 Easy, 1 Medium, 2 Hard) runsdtevent <level>and answersdt.opened{ key, level, repeat, x, z }. A key already answered gets its first answer again and opens nothing; keys are kept seven days.Refusals (
dt.error):malformed,bad-leveldt-missingconsole-unavailable(D363)dt-not-ready: nothing opened, DT's reply was its own Manual Event Failed message (read from DT's lang file, so a translated reply still matches), and DT loaded under fifteen minutes ago (D365)dt-no-spot: the same, after fifteen minutesrefused: DT said anything elseTally:
treasuresWon(Treasure Hunter, D375).Map:
map.live'sworldgainskind: "treasure"for each running chest. The set is seeded at load by finding DT's chests in the world, because DT has no API that lists them.Hello gains
integrations.dangerousTreasures, sent again when DT loads or unloads.rg.worldprintsdangerousTreasures=,treasures=,dtStarts=anddtWarmingUp=. README lists DT.Tested:
checkPlugin.jspasses (81 hooks), 18 tests. Compiled and loaded on both rigs (Rust 25902425, Oxide 2.0.7830, Carbon 2.0.262).rg.worldreaddangerousTreasures=False treasures=0on each, then both went back on the protocol-13 bridge. DT itself is not on the rigs, so its hooks and the start are left to §14.3.4's rows at the end walk (D331, D359).AI-assisted: written with Claude Code (disclosed per org policy).
🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
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