From 971bcc2558afb9cd186af9d0fc85d2dcdcdfba42 Mon Sep 17 00:00:00 2001 From: 44r0n7 <44r0n7+gitea@pm.me> Date: Fri, 23 Oct 2026 23:42:38 -0400 Subject: [PATCH] Build card describes the build tool in general, not the selected piece Co-Authored-By: Claude Opus 5.5 --- docs/DESIGN.md | 12 ++++++------ docs/PROJECT_MAP.md | 2 +- docs/agent-log.md | 12 ++++++++++++ src/ui/selection.js | 8 +++++--- test/play.py | 3 ++- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/docs/DESIGN.md b/docs/DESIGN.md index ccb3d8a..33abf03 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -148,9 +148,8 @@ above, including: wall material and filter settings. G no longer picks, as the owner requested (it is now Replace). - **The build menu** is a bar of tabs and icon tiles along the bottom: Structure, Moving, Liquids, Machines, Molds. Hover a tile for its full description, cost and placement help; - gamepad players see the selected tile’s popup. While building, the top-left card shows a - compact summary (name, cost, variant chips, Replace, ghosts, how to place, status); the full - description is in the hover popup. + gamepad players see the selected tile’s popup. While building, the top-left card describes + the build tool and shows the R/F settings, Replace, ghosts and status. - **No length limit when dragging.** Blocks out of the bot's reach become ghosts that it builds when it gets there. - **Pipes are thin:** sand, water and anything else loose passes them. Pumps and outlets are @@ -170,9 +169,10 @@ above, including: - **Replace is held G, not Ctrl.** The owner hit the browser's Ctrl+W (close tab) and Ctrl+D (bookmark) while replacing and flying with WASD, and the game ignored WASD while Ctrl was held. -- **The build tool has a compact top-left card** like the other tools. The owner asked for it - back after it was hidden; the long description stays in the hover popup. - +- **The build tool's top-left card describes the build tool**, like the other tools' cards: + how to place, the build keys, the R/F settings (material, direction, filter), Replace · G and + ghosts waiting. The selected piece's name, cost and description are in the menu and its hover + popup. The owner asked for a general description rather than the selected building. - **Ingot molds need no F.** They push junk and mixed metal out of the bottom as loose grains with the bars, throw slag away and rake the grate. Removing any mold returns its set metal: whole bars as bars, the rest as scrap. The owner asked what F was for once bars dropped on their own, and chose this over keeping F for cleaning. - **Fewer, smaller messages.** Molds show only a small percentage, red when blocked or spoiled and gold when a casting waits for F; details are in the hover panel. Bars dropping, blocked molds and set castings no longer pop up cards or toasts. Fan heat is a red marker on the fan; melted tubes and machines get a short red label where they were. Status lines are one short sentence. The owner found the messages too large and too many. diff --git a/docs/PROJECT_MAP.md b/docs/PROJECT_MAP.md index fe29b86..bda4ebd 100644 --- a/docs/PROJECT_MAP.md +++ b/docs/PROJECT_MAP.md @@ -397,7 +397,7 @@ The build menu along the bottom: categories, piece tiles and their icons. - functions: pieceIcon, catOf, selectBuildCat, cycleBuildCat, buildVariantChips, renderBuildBar, setupBuildBar - variables: BUILD_CATS, BUILD_ORDER, PIECE_ICONS, lastBuildKey, lastBuildMenu -### src/ui/selection.js (234 lines) +### src/ui/selection.js (236 lines) The selected tool and piece: R / Q / E, drill width, filter picker, the selection card, the bag panel. - functions: pieceUsesWall, setDrillWidth, tuneUnderCursor, cycleItem, cycleWall, rotate, toggleCollect, pickFilterUnderCursor, toggleFilterMat, toggleCollectUnderCursor, setBrush, pieceV, pieceExtra, filterChoices, matList, filterParts, filterSentence, applyFilterRun, openFilterPicker, filterBlockAt, chipCost, pieceCostNow, renderSelCard, renderBag - variables: lastBagKey diff --git a/docs/agent-log.md b/docs/agent-log.md index b4aaba3..20eb7ca 100644 --- a/docs/agent-log.md +++ b/docs/agent-log.md @@ -4,6 +4,18 @@ 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: the build card describes the build tool, not the piece (Claude Code) + +Note: "instead of the current info box for the build tool showing the current building selected, +it should just show a description about the build tool in general." The owner kept the R/F chips. + +- `src/ui/selection.js`: the build card reads "Build", then the R/F chips, Replace · G and + ghosts, a line on placing, the build keys and the status line. No piece name or cost. +- `test/play.py`: the card shows "Build" and the placing text, not the piece's name, cost or + description; the other card checks are unchanged. `play.py` and all 11 headless suites pass. +- Shots: `shots/build-card-general-{pixel,smooth}.png`. `docs/DESIGN.md`. +- Open: nothing. + ## 2026-10-23: world sounds are heard around the bot, not the view (Claude Code) Note: "the sound effect is still heard when the player's zoom level is farther out… sounds diff --git a/src/ui/selection.js b/src/ui/selection.js index 62ceff0..274ec76 100644 --- a/src/ui/selection.js +++ b/src/ui/selection.js @@ -169,12 +169,14 @@ function renderSelCard() {
${esc(b.name.toLowerCase())}hardness ≤ ${b.hard}reach ${drillReach(GAME.drillW)}${tn ? `tuned: ${esc(MD[tn].name.toLowerCase())} · R` : 'untuned · R tunes'}
Hold to send pulses at the cursor: rock they shake hard enough shatters and falls. Q/E width: narrow bores a long tunnel fast, wide clears a big face up close. R over a material tunes to it, so only that shatters. Built blocks are never harmed.
`; } else if (t === 'build') { - const P = piece(), cost = pieceCostNow(P); + // the build tool in general; the piece itself is described in the menu's hover popup + const P = piece(); const chips = buildVariantChips(P) + (GAME.replace ? 'Replace · G' : '') + (ng ? `${ng} ghost pieces waiting${ghostMissing ? ', some short on materials' : ''}.` : ''); - h = `
Q${esc(P.name)}${esc(costText(cost, 1) || 'free')}E
` + h = '
Build
' + (chips ? `
${chips}
` : '') - + `
${P.kind === 'block' ? 'Drag for a line, Shift-drag for a box.' : 'Click to place.'}${P.dirs ? ' R turns it.' : pieceUsesWall(P) ? ' R picks the material.' : ''} Shift+Q/E tab.
`; + + '
Place pieces from the menu below. Drag for a line, Shift-drag for a box; out of reach becomes ghosts.
' + + '
Q/E piece · Shift+Q/E tab · R turn or material · hold G replace · right click take back · hold C/X copy/cut · V paste · Ctrl+Z undo
'; } else if (t === 'vacuum') { ensureDropMat(); const m = GAME.dropMat, f = GAME.lmb ? GAME.vacFilter : 0; diff --git a/test/play.py b/test/play.py index 1c00853..1362c99 100644 --- a/test/play.py +++ b/test/play.py @@ -228,7 +228,8 @@ with sync_playwright() as p: ev('GAME.wallMat = RSTONE; hudDirty = true') check('build tool starts on wall blocks', ok) settle(150) - check('the build tool shows a compact top-left card', pg.is_visible('#selcard') and pg.inner_text('#selcard .name') == ev('piece().name') and ev("costText(pieceCostNow(piece()), 1) || 'free'") in pg.inner_text('#selcard') and ev('piece().desc') not in pg.inner_text('#selcard')) + card = pg.inner_text('#selcard') if pg.is_visible('#selcard') else '' + check('the build tool card describes the build tool, not the piece', pg.inner_text('#selcard .name') == 'Build' and 'menu below' in card and ev('piece().name') not in card and ev("costText(pieceCostNow(piece()), 1) || 'free'") not in card and ev('piece().desc') not in card, card[:160]) check('the build menu has no status row', pg.locator('#buildbar .bb-status').count() == 0) check('the build menu has no short description row', pg.locator('.bb-tip').count() == 0) for id in ['wall', 'grate']: