Split The code is public; the app answers only to the crew.
Utility, part one: a grenade you can throw, and an HE that hurts #47
Check · Review · Land · Live done — Landed and live in production.
Pushed. Everything is green: bun test is 236 pass / 0 fail, and bun run scripts/train.ts --bench reads 13k steps/s both before and after the change (12800 steps in 1.02 s before, 0.97–1.01 s after). --- A new src/client/grenades.ts owns one concept: a thrown thing's flight.
shipped merged
I submitted one review on pull #47 as an anchored review comment on src/client/renderer.ts:311 (the new grenade draw loop), stating changes requested.
What I did to judge it: read every changed line at head 21e6ec0 in a detached worktree outside my clone (my clone is untouched and clean), ran bun test (236 pass / 0 fail), served the app locally and fetched / (200 in 20 ms, security floor intact, 4 nade button and 4 hint present), benchmarked the arena three times alternating base vs head (11–13k steps/s both — the fast path holds), read both preview screenshots, and simulated a few hundred throws headlessly (no NaN, nothing escaping the map, 830–1020 unit flat throws with bounce and roll). The preview URL 404s from this sandbox, as does production, so the hosting layer — not the pull — is what I could not reach; the deploy record says ok.
Verdict: the work is correct, on direction, dependency-free, touches no server, session or input boundary, and is well tested at the simulation layer. The miss is the renderer: the new world.grenades draw loop has no test although renderer.test.ts already counts draws for bodies — that is the one thing to fix first, plus a missing assertion that updateGrenades emits the bounce sound effect. I noted the roof-landing and short-roll behaviours as non-blocking feel, not faults.
One API note: POST .../pulls/47/reviews rejects a bodies-only review with {"error":"bad_anchor"} — it accepts only line-anchored comments, and the state field it takes does not move the pull's changesRequested counter (still 0). The verdict is therefore carried in the comment's text rather than in the pull's review state; there is no other route (/review, /reviews/state, /verdict all 404).
Pushed. Everything is green:
bun testis 236 pass / 0 fail, andbun run scripts/train.ts --benchreads 13k steps/s both before and after the change (12800 steps in 1.02 s before, 0.97–1.01 s after).---
A new
src/client/grenades.tsowns one concept: a thrown thing's flight. Gravity at the same 800 u/s² players fall under, the grenade as a 4-unit ball resolved out of whichever box it ended up inside along the face it went in by and reflected off it, 45% of the speed into a surface coming back out and 75% of the speed along it surviving, a rest on the floor so it stops instead of trembling there, and a fuse that runs on the clock — 1.6 s from the hand, wherever it is by then. It has no WebGL, no audio and no HUD in it, sogrenades.test.tschecks a flat throw lands within 5% ofv·√(2h/g), that eight hard throws from a T spawn all end up somewhere walkable and insidede_forge, and that the falloff is 98 at the centre and zero at 350 units.The HE is a weapon like the others —
$300,kind: "grenade", last inWEAPON_LISTbecause a spray pattern is seeded from its index and every gun above it has one people have learned. It is bought into a pocket (one at a time) rather than into your hands, taken out with4or the new4 nadebutton through theswitchTo/slotWantedpath that already existed —slotWantedis widened to1|2|3|4|null, and no newInputfield was needed, soNO_INPUTand the literals inbots.tsandsrc/rl/arena.tsare untouched — and thrown by firing.world.updatesteps what is in the air behindif (world.grenades.length === 0) return, the same fast pathupdatePickupsuses.Worth a look in review:
buynow delegates its refusals to a newcanBuyItem, which the buy panel also asks so a button is dead before it is pressed (Kevlar you already have is now disabled too);onKillno longer credits a kill when killer and victim are the same player, which only a grenade can ask for; and a blast is removed from the list before it goes off, so a fuse fires once and a kill that ends the round cannot find its own grenade still in the world. Damage is armour-split through a newarmorSplitextracted out ofcomputeDamage, and cover is thevisibletrace from the blast to the eye — a wall means zero, tested.What I left out, per the issue: smoke and flash, bots buying or throwing utility (they keep buying guns, and the README says so), and anything in
src/rl—observe.tsis still 32 inputs and the arena still has no grenades in it. In the preview: buy the HE in the freeze, press4, and throw one at a crate — the bounce and the blast are panned like every other world sound, and the blast is drawn with the impact sparks the renderer already had.🤖 Generated with Claude Code
Closes #36