Build card describes the build tool in general, not the selected piece
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+6
-6
@@ -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.
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+5
-3
@@ -169,12 +169,14 @@ function renderSelCard() {
|
||||
<div class="row" style="flex-wrap:wrap;gap:4px"><span class="chip">${esc(b.name.toLowerCase())}</span><span class="chip">hardness ≤ ${b.hard}</span><span class="chip">reach ${drillReach(GAME.drillW)}</span>${tn ? `<span class="chip ok"><span class="sw" style="display:inline-block;vertical-align:-2px;width:9px;height:9px;margin-right:4px;background:${rgbOf(tn)}"></span>tuned: ${esc(MD[tn].name.toLowerCase())} · R</span>` : '<span class="chip">untuned · R tunes</span>'}</div>
|
||||
<div class="sub">Hold to send pulses at the cursor: rock they shake hard enough shatters and falls. <kbd>Q</kbd>/<kbd>E</kbd> width: narrow bores a long tunnel fast, wide clears a big face up close. <kbd>R</kbd> over a material tunes to it, so only that shatters. Built blocks are never harmed.</div>`;
|
||||
} 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 ? '<span class="chip hot">Replace · G</span>' : '')
|
||||
+ (ng ? `<span class="chip ok">${ng} ghost pieces waiting${ghostMissing ? ', some short on materials' : ''}.</span>` : '');
|
||||
h = `<div class="row cycle"><kbd>Q</kbd><span class="name grow">${esc(P.name)}</span><span class="chip${canAfford(cost, 1) ? '' : ' bad'}">${esc(costText(cost, 1) || 'free')}</span><kbd>E</kbd></div>`
|
||||
h = '<div class="row"><span class="name grow">Build</span></div>'
|
||||
+ (chips ? `<div class="row" style="flex-wrap:wrap;gap:4px">${chips}</div>` : '')
|
||||
+ `<div class="sub">${P.kind === 'block' ? 'Drag for a line, <kbd>Shift</kbd>-drag for a box.' : 'Click to place.'}${P.dirs ? ' <kbd>R</kbd> turns it.' : pieceUsesWall(P) ? ' <kbd>R</kbd> picks the material.' : ''} <kbd>Shift</kbd>+<kbd>Q</kbd>/<kbd>E</kbd> tab.</div>`;
|
||||
+ '<div class="sub">Place pieces from the menu below. Drag for a line, <kbd>Shift</kbd>-drag for a box; out of reach becomes ghosts.</div>'
|
||||
+ '<div class="sub"><kbd>Q</kbd>/<kbd>E</kbd> piece · <kbd>Shift</kbd>+<kbd>Q</kbd>/<kbd>E</kbd> tab · <kbd>R</kbd> turn or material · hold <kbd>G</kbd> replace · right click take back · hold <kbd>C</kbd>/<kbd>X</kbd> copy/cut · <kbd>V</kbd> paste · <kbd>Ctrl</kbd>+<kbd>Z</kbd> undo</div>';
|
||||
} else if (t === 'vacuum') {
|
||||
ensureDropMat();
|
||||
const m = GAME.dropMat, f = GAME.lmb ? GAME.vacFilter : 0;
|
||||
|
||||
+2
-1
@@ -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']:
|
||||
|
||||
Reference in New Issue
Block a user