F on an ingot mold does nothing and says nothing
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -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
|
- functions: vacuumTargetAt, toolVacuum, nozzle, toolBlow, flyOpen, depositNear, bagTemp, landFlyer, flyTick, toolIgnite
|
||||||
- variables: blowRR, FLY_G, FLY_Q
|
- 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.
|
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
|
- functions: removePieceAt, removePieceAt0, placeMachineAt, placeMoldAt, toggleGateAt, interactAt
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
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.
|
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)
|
## 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."
|
Note: "the silo art looks the same for both pixelated graphiocs and smooth."
|
||||||
|
|||||||
+2
-1
@@ -73,7 +73,8 @@ function interactAt(x, y) {
|
|||||||
const g = toggleGateAt(x, y);
|
const g = toggleGateAt(x, y);
|
||||||
if (g) { emit({ t: 'sfx', s: 'gate' }); return g === 'open' ? 'Gate opened.' : 'Gate closed.'; }
|
if (g) { emit({ t: 'sfx', s: 'gate' }); return g === 'open' ? 'Gate opened.' : 'Gate closed.'; }
|
||||||
const mo = moldAt(x, y);
|
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);
|
const pb = ((y / BS) | 0) * BW + ((x / BS) | 0);
|
||||||
if (blockP[pb] === BP_PUMP || blockP[pb] === BP_OUTLET) {
|
if (blockP[pb] === BP_PUMP || blockP[pb] === BP_OUTLET) {
|
||||||
blockV[pb] ^= 4; emit({ t: 'sfx', s: 'ui' });
|
blockV[pb] ^= 4; emit({ t: 'sfx', s: 'ui' });
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ function doInteract() {
|
|||||||
if (msg) break outer;
|
if (msg) break outer;
|
||||||
}
|
}
|
||||||
if (msg) { setStatus(msg, 'info'); if (!/^New (drill bit|bag)/.test(msg)) toast(msg); }
|
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
|
// 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.
|
// direction, wall material and filter settings. On loose material it picks that to blow out.
|
||||||
|
|||||||
@@ -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]'))
|
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'))
|
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])'))
|
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)
|
settle(1500)
|
||||||
pg.screenshot(path=str(out / '06-bars.png'))
|
pg.screenshot(path=str(out / '06-bars.png'))
|
||||||
pg.keyboard.press('2'); settle(60)
|
pg.keyboard.press('2'); settle(60)
|
||||||
|
|||||||
+1
-1
@@ -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']) {
|
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;`);
|
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)');
|
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();
|
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]);');
|
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]);');
|
||||||
|
|||||||
Reference in New Issue
Block a user