feat(bridge): Guarded Crate on protocol 14 (PLAN_REDESIGNS §14.3.5) #39
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/guarded-crate"
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 6 of the §14.3 integration plan. Spec: docs
rust-link/PROTOCOL.md§20.9 and §17.3 (docs PR alongside). Record:modules/rust/PLAN_REDESIGNS.md§14.3.19.Three events from Guarded Crate's own hooks:
gc.started{ x, z, key? }gc.ended{ steamId?, name?, x?, z? }: the player who killed the last guard. Both are absent when nobody did (NpcSpawn reloaded, the guards died some other way, or another NPC killed the last one).gc.failed{ x, z }: the timeoutNone is sent while the world is not live. A clearing is still counted.
The key's join is exact, as Dangerous Treasures' is: the start hook fires inside the call that creates the event.
gc.place{ key, event, monument+offsets | x,z[,y] }(a world call's location) runs<command> position <event> x,y,zand answersgc.placed{ key, event, repeat, x, z }.gcrateby default).Refusals (
gc.error):malformed,bad-event,gc-missingnpcspawn-missing: Guarded Crate'spositiondoes not check NpcSpawn, so without it the crate would land unguarded and free to hack (D364)console-unavailable(D363)no-monument,out-of-range,off-mapgc-too-close(another crate within 80 m),bad-position,refusedGuarded Crate's own running list, its private
EventManager.Instances, is read by reflection because Guarded Crate has no API that lists events. It is used three ways:gcrate stop allended, since neither raises a hookWhere the list can't be read, the hooks alone keep the set, and the log says so once.
Hello gains
integrations.guardedCrate:{ loaded, version, npcSpawn: { loaded, version }, events }eventscomes from Guarded Crate's data file (CrateEventEntries), not its config.Tally
guardedWon(Warden, D375). Map:map.live'sworldgainskind: "guarded".rg.worldprints the new fields and re-checks the list first.Fix found on the rig: Guarded Crate's cargo plane was announced as Rust's
airdrop.called. Planes for which Guarded Crate's ownAPI_IsGuardedCrateCargoPlanereturns true are now skipped.Tested:
checkPlugin.jspasses (84 hooks) and its 18 tests pass.rg.worldread the four events from the data file, and Guarded Crate's list was readable.gcrate startandgcrate position(in the fully quoted formConsoleSystem.Runsends) each counted a running crate, with noairdrop.calledafter the fix.gcrate stop alltook it off.AI-assisted: written with Claude Code (disclosed per org policy).
🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
Stage 6 of the §14.3 integration plan. Spec: docs rust-link/PROTOCOL.md §20.9. - gc.started, gc.ended (the clearer, or nobody) and gc.failed from Guarded Crate's three hooks; the start's key joins exactly, inside the call. - gc.place { key, event, location as a world call } runs `<command> position <event> x,y,z`; refuses npcspawn-missing itself, since Guarded Crate's `position` does not check and the crate would land unguarded (D364). - The running set is checked against Guarded Crate's private list (by reflection): the hotload seed, `stop all` (no hook), and which event ended. - Hello's integrations.guardedCrate with npcSpawn and the events from its data file; the tally's guardedWon (Warden); map.live's guarded rows; rg.world. - Guarded Crate's cargo plane no longer says airdrop.called. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY