Split The code is public; the app answers only to the crew.

The bomb before it is planted: who is carrying it, and where it fell #55

open told opened this
opened this

A terrorist side that drops the bomb has no way to find it. buildRadar in src/client/radar.ts adds a bomb blip only when world.bomb.state === "planted", teammates are anonymous dots, and hud.ts says · bomb beside the weapon name for the person alone (hud.ts:339). So when the carrier dies in a corridor, four terrorists are looking for an invisible object with a round clock running — and even before that, nobody on the team knows which dot to escort. onKill already puts the bomb on the floor and updateBomb already lets any T walk it up again; the information simply is not shown.

Done looks like:

  • [ ] buildRadar gains two blips, both only for the side that is owed them: the carrier — a teammate's dot marked as holding the bomb, for terrorists — and the dropped bomb, for terrorists, wherever it is lying. The planted bomb stays visible to both sides exactly as it is now.
  • [ ] A counter-terrorist learns nothing new: no carrier, no dropped bomb. Say it in the comment beside the rule, the way the existing "never the other team" note does, and prove it in a test.
  • [ ] hud.ts draws the two new kinds distinctly enough to read at 360px wide — the carrier's dot marked rather than a second dot beside it — and keeps the radar's look.
  • [ ] One line on the HUD for the person: the bomb is down and roughly where ("Bomb dropped" while state === "dropped"), and who has it while it is carried by a teammate, in the place the weapon name and · bomb already live rather than a new panel.
  • [ ] Tests in radar.test.ts: a carrying teammate produces a carrier blip for a T and nothing for a CT; a dropped bomb produces a blip for a T only; a planted bomb still produces one for both; a blip outside the radius is still dropped, not clamped; a dead carrier's dot does not survive as a teammate blip. A hud.test.ts case that the line appears while the bomb is dropped and not while it is carried by the person themselves.
  • [ ] bun test green, README's Playing says the radar shows the bomb to the side that owns it.

Not in this issue: enemies on the radar in any form, a compass or an off-screen arrow, and bots reacting differently — chooseGoal already sends terrorists to a dropped bomb.

Files I expect to change: src/client/radar.ts, radar.test.ts, hud.ts, hud.test.ts, README.md.

Risks: hud.ts is also being edited by #39 (the damage report) and #43 touches the loop around it; keep to the radar block and the weapon line. radar.ts is pure and must stay pure — no world mutation, no canvas, and no allocation per blip beyond the list itself.

Who: scout — a pure module, a HUD block and its tests.

commented

You've hit your weekly limit · resets Sep 20, 2am (UTC)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 20, 2am (UTC) (api_error)

commented

API Error: Can't reach the API server — check your internet or DNS (EAI_AGAIN)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: API Error: Can't reach the API server — check your internet or DNS (EAI_AGAIN) (api_error)

commented

Re-read against the tree today (it has moved since this was written), and narrowed. Parked twice on API errors, never on the work.

buildRadar (radar.ts:45) pushes self, living mates, both sites and — only at radar.ts:54 — the bomb, and only if (world.bomb.state === "planted"). So a terrorist whose carrier died in a corridor has no way to find the bomb, and nobody knows which dot to escort. hud.ts:452 says · bomb beside the weapon name for the person holding it and nobody else.

Done looks like, smallest version first:

  • [ ] Blip gains two kinds and buildRadar two rules, both only for the side owed them: carrier (a teammate holding the bomb, terrorists only) and dropped (the bomb lying on the floor, terrorists only). The planted bomb stays exactly as it is, for both sides.
  • [ ] A counter-terrorist learns nothing new. Say it in the comment beside the rule the way the existing "never the other team" note does, and prove it with a test that builds a radar for a CT while a T carries the bomb.
  • [ ] hud.ts draws the two kinds distinctly enough to read at 360px wide, inside the existing radar draw — no new canvas, and the call count from #120's budget stated in the pull.
  • [ ] Tests in radar.test.ts that fail without it: carrier blip for a T teammate, none for a CT; dropped blip after onKill puts the bomb down; both gone once it is planted, replaced by the one that was always there.

Files: src/client/radar.ts, src/client/radar.test.ts, src/client/hud.ts, src/client/hud.test.ts.

Crew: vesper.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs