From daf91891fc6b157e68f19094a537fa1f3ea28e48 Mon Sep 17 00:00:00 2001 From: 44r0n7 <44r0n7+gitea@pm.me> Date: Fri, 23 Oct 2026 23:37:49 -0400 Subject: [PATCH] F on an ingot mold does nothing and says nothing Co-Authored-By: Claude Opus 5.5 --- docs/PROJECT_MAP.md | 2 +- docs/agent-log.md | 11 +++++++++++ src/sim/actions.js | 3 ++- src/ui/actions.js | 2 +- test/play.py | 3 +++ test/t_molds.js | 2 +- 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/PROJECT_MAP.md b/docs/PROJECT_MAP.md index 9c20533..12e2d3f 100644 --- a/docs/PROJECT_MAP.md +++ b/docs/PROJECT_MAP.md @@ -286,7 +286,7 @@ The vacuum, blowing grains out, grains in flight (flyers), and the flame tool. M - functions: vacuumTargetAt, toolVacuum, nozzle, toolBlow, flyOpen, depositNear, bagTemp, landFlyer, flyTick, toolIgnite - variables: blowRR, FLY_G, FLY_Q -### src/sim/actions.js (86 lines) +### src/sim/actions.js (87 lines) Player actions on built things: take back, place a machine or mold, gates, F to interact. Take back whatever piece is at (x,y): machine, mold or block. Returns a message. - functions: removePieceAt, removePieceAt0, placeMachineAt, placeMoldAt, toggleGateAt, interactAt diff --git a/docs/agent-log.md b/docs/agent-log.md index 454f706..532b3ed 100644 --- a/docs/agent-log.md +++ b/docs/agent-log.md @@ -4,6 +4,17 @@ What agents have done, newest first. Add an entry for every piece of work: the d note or request it was for, what changed, the files touched, the tests run, and anything left open or not verified. Keep each entry short; the git history has the details. +## 2026-10-23: F on an ingot mold does nothing and says nothing (Claude Code) + +Note: "now that ingot molds empty themselves, F still makes a message…" + +- `src/sim/actions.js` `interactAt` passes ingot molds by, so F reaches anything else nearby; + `src/ui/actions.js` shows no "Nothing to use there." when the cursor is on an ingot mold. +- Tests: `t_molds` (F on an ingot mold in every state returns nothing, changes nothing, no + sound) and `play.py` (F over an ingot mold leaves no status and no toast). All 11 headless + suites and `play.py` pass. +- Open: nothing. + ## 2026-10-23: pixel-art silo for the pixel look (Claude Code, with Codex) Note: "the silo art looks the same for both pixelated graphiocs and smooth." diff --git a/src/sim/actions.js b/src/sim/actions.js index 0e57ca6..d40cd08 100644 --- a/src/sim/actions.js +++ b/src/sim/actions.js @@ -73,7 +73,8 @@ function interactAt(x, y) { const g = toggleGateAt(x, y); if (g) { emit({ t: 'sfx', s: 'gate' }); return g === 'open' ? 'Gate opened.' : 'Gate closed.'; } const mo = moldAt(x, y); - if (mo) { const r = collectMold(mo); if (mo.kind !== 'ingot' && !r.startsWith('New') && !r.startsWith('Knocked')) emit({ t: 'sfx', s: 'ui' }); return r; } + // ingot molds empty themselves: F passes them by + if (mo && mo.kind !== 'ingot') { const r = collectMold(mo); if (!r.startsWith('New') && !r.startsWith('Knocked')) emit({ t: 'sfx', s: 'ui' }); return r; } const pb = ((y / BS) | 0) * BW + ((x / BS) | 0); if (blockP[pb] === BP_PUMP || blockP[pb] === BP_OUTLET) { blockV[pb] ^= 4; emit({ t: 'sfx', s: 'ui' }); diff --git a/src/ui/actions.js b/src/ui/actions.js index 9e5e41f..12d76d1 100644 --- a/src/ui/actions.js +++ b/src/ui/actions.js @@ -43,7 +43,7 @@ function doInteract() { if (msg) break outer; } if (msg) { setStatus(msg, 'info'); if (!/^New (drill bit|bag)/.test(msg)) toast(msg); } - else { setStatus('Nothing to use there.', 'info'); } + else if ((moldAt(ax, ay) || {}).kind !== 'ingot') setStatus('Nothing to use there.', 'info'); // an ingot mold needs no F: say nothing } // Pick (middle mouse): the piece under the cursor becomes the one you build, with its // direction, wall material and filter settings. On loose material it picks that to blow out. diff --git a/test/play.py b/test/play.py index b014fc4..d1e346e 100644 --- a/test/play.py +++ b/test/play.py @@ -303,6 +303,9 @@ with sync_playwright() as p: check('bars set and drop on their own', ev("ents.length === 3 && molds[0].state === 'short' && molds[0].ready.length === 0"), ev('[molds[0].state, ents.length]')) pg.screenshot(path=str(out / '05-mold-ready.png')) check('three bars drop below the mold without F', ev('ents.every(e => e.m === BARCU && e.iy >= molds[0].y + molds[0].h)'), ev('ents.map(e => [e.ix, e.iy])')) + ev("GAME.status = ''; GAME.statusT = 0"); n_toasts = ev("$('toasts').children.length") + pg.mouse.move(*cell_to_screen(ev('molds[0].x') + 3, ev('molds[0].y') + 3)); settle(150); pg.keyboard.press('f'); settle(150) + check('F on an ingot mold says nothing', ev('GAME.status') == '' and ev("$('toasts').children.length") == n_toasts, ev('GAME.status')) settle(1500) pg.screenshot(path=str(out / '06-bars.png')) pg.keyboard.press('2'); settle(60) diff --git a/test/t_molds.js b/test/t_molds.js index 1da557f..6260da3 100644 --- a/test/t_molds.js +++ b/test/t_molds.js @@ -179,7 +179,7 @@ check('loose junk never overlaps a dropped bar', under('SAND') === 1 && run('!ma for (const state of ['empty', 'short', 'flawed', 'ready', 'filling']) { ingot(); run(`molds[0].state = "${state}"; setCell(molds[0].cavs[0][0], SAND, 30, 0); EV.length = 0;`); msg = run('interactAt(molds[0].x + 1, molds[0].y + 1)'); - check(`F does nothing to a ${state} ingot mold and makes no sound`, /empty themselves/.test(msg) && cavCount(0, run('SAND')) === 1 && run('EV.length === 0 && bagTotal === 0 && ents.length === 0')); + check(`F does nothing to a ${state} ingot mold and says nothing`, msg === '' && cavCount(0, run('SAND')) === 1 && run('EV.length === 0 && bagTotal === 0 && ents.length === 0')); } fresh(); run('addMold("ingot", 30, 20, BARCU, true); molds[0].cavs[0].slice(0, 20).forEach(i => setCell(i, COPPER, 30, F_CAST)); removeMold(molds[0]);');