Build range follows the screen; out-of-range replace ghosts replace (t64)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -470,7 +470,8 @@ above, including:
|
||||
building needs a range limit at all, since the bot needs no arms to build. Agreed: keep a limit,
|
||||
but make it about what's on screen, so anything the player can see and aim at builds directly
|
||||
and anything beyond stays a blueprint built when the bot comes near. No limit at all would let
|
||||
players build in places they've never been and link far claims instantly. Not built yet.
|
||||
players build in places they've never been and link far claims instantly. Built: the range is
|
||||
the visible view box, at least 64 grains from its centre and at most 200 when zoomed far out.
|
||||
- **Sticky materials slide freely on built surfaces (t61, 2026-10-27).** Stickiness (STICK) is the
|
||||
chance per tick a grain takes a diagonal step, which made clay lumps, snow, wood chunks, ash and
|
||||
dirt creep down sloped walls (a single clay grain never got down a 20-piece slope). The owner
|
||||
|
||||
+6
-5
@@ -315,9 +315,10 @@ Bars and other loose objects (ents), and the bag: adding, taking, costs and refu
|
||||
- functions: entSolidCell, entSupportCount, entFreeAt, entMark, spawnBar, removeEnt, entScrewAt, entScrewFree, entScrewMove, entScrewLane, entScrewEdge, entScrewEnter, entScrewTick, entDiagonalScrewTick, entBeltScrewEnter, entSlopeBeltTick, entTick, entsInCircle, bagAdd, bagTake, giveOrDrop, refundAt, canAfford, payCost, fmtMoney, costText, needText
|
||||
- variables: BAR_W, BAR_H, entCurM, droppedLast
|
||||
|
||||
### src/sim/tools.js (52 lines)
|
||||
### src/sim/tools.js (65 lines)
|
||||
Tool helpers: reach, brushes, and plain digging.
|
||||
- functions: inReach, forBrush, drillReach, inDrillReach, toolDig
|
||||
- functions: setBuildRange, inBuildRange, inReach, forBrush, drillReach, inDrillReach, toolDig
|
||||
- variables: BUILD_MAX, buildBox
|
||||
|
||||
### src/sim/drill.js (161 lines)
|
||||
The resonance drill: tuned pulses that shatter one material.
|
||||
@@ -342,7 +343,7 @@ Player actions on built things: take back, place a machine or mold, gates, F to
|
||||
Blueprints: copy, cut, flip, cost and paste (as ghosts) a region of built pieces.
|
||||
- functions: copyRegion, flipBlueprint, bpCost, pasteGhost, cutRegion, footprintBlocker, clearFootprint
|
||||
|
||||
### src/sim/undo.js (87 lines)
|
||||
### src/sim/undo.js (93 lines)
|
||||
Undo (Ctrl+Z) for building, and the bot building ghosts.
|
||||
- functions: undoNote, undoPush, undoRecord, undoLast, clearAllGhosts, ghostTick, ghostTick0
|
||||
- variables: UNDO_MAX, undoStack, undoRec, ghostMissing, ghostIter
|
||||
@@ -511,7 +512,7 @@ Keyboard and mouse listeners.
|
||||
- functions: isTyping
|
||||
- variables: canvas
|
||||
|
||||
### src/ui/actions.js (242 lines)
|
||||
### src/ui/actions.js (243 lines)
|
||||
What input does: overlays, F, pick, copy / cut / paste, undo, building and tool use each frame. Which overlays are on, shown as a coloured frame round the screen and a named badge
|
||||
- functions: updateOverlayUI, toggleLens, doInteract, pickUnderCursor, aimBlock, stampOrigin, selModeHeld, startPaste, stopSelectAndPaste, plural, piecesIn, doUndo, endRmbRecord, dragDirFor, blockLabel, primaryPress, primaryRelease, secondaryPress, toolTick
|
||||
- variables: ovShown
|
||||
@@ -544,7 +545,7 @@ Shared world colours, minimap and full map.
|
||||
- functions: resetMap, mapArea, updateMap, drawMap, mapFit, drawFullMap, openMap, zoomMap, zoomMinimap
|
||||
- variables: MAP_S, MAP
|
||||
|
||||
### src/ui/loop.js (136 lines)
|
||||
### src/ui/loop.js (137 lines)
|
||||
The frame loop and boot.
|
||||
- functions: scanVisible, frame, boot
|
||||
- variables: lastT, acc, lastRender, frameMs, simMs, fpsSm, ambientT
|
||||
|
||||
@@ -4,6 +4,19 @@ 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-27: t64 build range about the screen; out-of-range replace ghosts (Claude Code)
|
||||
|
||||
- `setBuildRange`/`inBuildRange` in `src/sim/tools.js`: the UI sets the view box each frame
|
||||
(`src/ui/loop.js`); half-sizes clamped to REACH..BUILD_MAX (64..200 grains); with no view (tests)
|
||||
a REACH box around the bot. Used by `blockInReach`, machine/mold placement and previews,
|
||||
right-click take-back, hover reach, and ghost building for blocks, machines and molds.
|
||||
- A replace (G) placed beyond range stores a replace flag on the ghost (`[code, v, extra, 1]`);
|
||||
`ghostTick0` removes the old piece (refunded) and places the new one (charged), or re-sets a
|
||||
filter's settings, when the bot comes in range.
|
||||
- Files: `src/sim/tools.js`, `src/sim/blocks.js`, `src/sim/undo.js`, `src/ui/actions.js`,
|
||||
`src/ui/previews.js`, `src/ui/info.js`, `src/ui/loop.js`, `test/t_build.js`, `docs/DESIGN.md`,
|
||||
`docs/PROJECT_MAP.md`. Tests: `python3 test/run_all.py --browser` all passed. Not played by hand.
|
||||
|
||||
## 2026-10-27: t49 throughput overlay (Claude Code)
|
||||
|
||||
- The I overlay also shows grains per second at each line's open outlet, an orange glow on
|
||||
|
||||
Reference in New Issue
Block a user