Skip to content

the-robots: gate ammo chests, wire the damage vignette, fix chest fallback - #3

Merged
Noisemaker111 merged 1 commit into
mainfrom
claude/the-robots-1346
Sep 8, 2026
Merged

Noisemaker111 merged 1 commit into
mainfrom
claude/the-robots-1346

Conversation

@Noisemaker111

Copy link
Copy Markdown
Owner

Fixes the confirmed defects from Noisemaker111/jgengine#1346 in the-robots.

  • src/game/commands.ts: openAmmoChest now goes through the same openedChestsStore gate as red chests (claimChest); a re-interact shows CHEST EMPTY and grants nothing.
  • src/game/feel.ts, src/loop.ts: notePlayerHealth marks a hurt when the health stat drops between ticks, so DamageVignette renders (noteHurt was never called).
  • src/game/world/models.ts: red_chest.fallbackModelquaternius-modular-scifi/Prop_Crate4 (was dungeon/chest, not in any declared pack).
  • src/game/items/weapons/catalog.ts: dropped the unused starterSmg roll.
  • src/game/loadouts.ts: starter cash 40 → 50 so one Insta-Health (45) is affordable before the first kill. Assumption: a small nudge is enough; adjust if the economy wants otherwise.
  • src/game/commands.test.ts, src/game/feel.test.ts: chests pay out once; health drop marks a hurt, first reading and heals do not.

Not changed: the gun viewmodels are already primitive blasters on main (Viewmodel.tsx), and the unbounded gunRegistry / lastFiredAt maps are left as-is (pruning needs a liveness rule for rolled guns).

Root cause: the ammo chest handler had no once-only gate while the red chest one did; the vignette signal had no producer. Engine side: pickModel accepted a dead fallbackModel silently — a dev warning lands in Noisemaker111/jgengine#1751.

Refs Noisemaker111/jgengine#1346

Verification: bun test src 88 pass (against local 0.18.1 packages; bun install in Games fails on @jgengine/navbake 404 so the workspace typecheck could not run — tsgo on the game reports only the missing vite/client types). drive --spawn -539,0,531.5 --key KeyE twice: reserve 80 → 104 and grenades 2 → 3 after the first press only. drive --spawn -57,0,560 --record: health 80 → 0 under the Rusk aura with the vignette visible on hit frames.

Before / after (starter cash in the HUD):

play-before
play-after

Damage vignette, frames from the same clip (no hit in the window / hit):

vignette-after-idle
vignette-after-hit

▶ hurt-clip.mp4 (download to play)

🤖 Generated with Claude Code

…lback

Refs Noisemaker111/jgengine#1346

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant