Silo contents at a glance (t38); drill aimed past its reach stays calm (t41)

Silos show a wide fill window in the material's colour in both looks,
and the cursor label names the contents anywhere over the outline.
Aiming the drill beyond its reach keeps normal colours, marks where the
pulse stops, and drops the red circle and the out-of-reach toast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 18:40:05 -04:00
co-authored by Claude Opus 5.5
parent 9bc5a6c3af
commit b74a9173eb
12 changed files with 197 additions and 44 deletions
+7
View File
@@ -98,6 +98,13 @@ Details and numbers live in the code and in `docs/systems/`.
## Decisions
- **Distant drill aim is normal (t41, 2026-10-26).** The owner normally points beyond the
drill's reach and expects players to do the same. Keep the pulse colour and light crosshair,
mark the pulse's far edge, and omit distance warnings for the drill. Other tools still warn.
- **Silo contents are visible without opening the gate (t38, 2026-10-26).** The owner wants
contents beside the cursor anywhere over the outline and a material-coloured fill window at
every zoom in both looks, while keeping the real steel silo shape.
- **Square corners hold grains (t39, 2026-10-26).** The owner wants square wall staircases to
hold material instead of leaking through each touching corner. Powder, liquid and gas cannot
step diagonally between two solid neighbours; powder neighbours still allow free piles to
+7 -6
View File
@@ -287,7 +287,7 @@ Bars and other loose objects (ents), and the bag: adding, taking, costs and refu
Tool helpers: reach, brushes, and plain digging.
- functions: inReach, forBrush, drillReach, inDrillReach, toolDig
### src/sim/drill.js (161 lines)
### src/sim/drill.js (160 lines)
The resonance drill: tuned pulses that shatter one material.
- functions: drillOrigin, pulseRay, builtCell, toolPulse, crumbleAround, crumbly, shatterCell, pulseTick
- variables: PULSE_W, PULSE_EVERY, PULSE_SPEED, PULSE_K, drillPulses, lastPulseTick, drillWidth, THIN_BONUS, CRUMBLE_MAX, THIN_BONUS_OFF
@@ -366,9 +366,9 @@ Scale colour without changing the smooth-look class.
- functions: fogColor, diagonalTubeJoins, diagonalTubeShape, diagonalTubeBlock, drawWorld
- variables: TUBE_CLASS, diagonalJoins, diagonalAcross, diagonalAlong, diagonalCap
### src/render/machines.js (242 lines)
### src/render/machines.js (256 lines)
Machine overlays: fans, engines, silo and the rest, drawn on top of the world.
- functions: cellRect, drawHazardRims, drawMachines, drawProcBlocks, drawSilo, drawSiloPixel, drawRackBlocks
- functions: cellRect, drawHazardRims, drawMachines, drawProcBlocks, drawSilo, drawSiloPixel, drawSiloWindow, drawRackBlocks
### src/render/overlays.js (229 lines)
Other overlays: floating text, rain and snow, flow arrows, filter tags, molds, the bot, particles.
@@ -457,7 +457,7 @@ Selection panels: current tool card and bag materials.
- functions: renderSelCard, renderBag
- variables: lastBagKey
### src/ui/info.js (189 lines)
### src/ui/info.js (195 lines)
Discovery cards, hover info (I) and the cursor label.
- functions: showCard, howText, discoveryCard, reactionsOf, hoverInfo, renderInfo, drawCursorLabel, pipeContentsText
@@ -476,11 +476,11 @@ Gamepad input.
- functions: padPressed, pollPad
- variables: PAD
### src/ui/previews.js (237 lines)
### src/ui/previews.js (234 lines)
Cursor previews: shared grid helpers, air streaks and tool preview dispatch.
- functions: blockRectPx, drawGrid, previewColor, drawAirStreaks, drawReachCircle, drawPreviews, previewBlock
### src/ui/preview-drill.js (104 lines)
### src/ui/preview-drill.js (107 lines)
Drill previews: shaken rock cracks, pulse wavefronts and aiming fan. Rock the drill has shaken but not yet broken shows cracks, more and finer as it nears breaking. Each crack is a contour line of a noise field (marching squares, cell by cell), so the lines run on unbroken from one cell to the next and look like real fractures, not a pattern.
- functions: crackSeg, drawCracks, pulseRGB, fanPoints, drawDrillPulses, drawDrillAim
- variables: CRACK_N, CRACK_LV
@@ -527,6 +527,7 @@ The frame loop and boot.
- `test/t_physics.js`: Sand and other powders, molten metal and gases: heaps, sorting, sinking, setting, rising and fading. Water has its own suite (t_water.js). Tall worlds keep geothermal heat out of the way.
- `test/t_pipes.js`: Pipes, pumps and outlets move liquids; the Grinder grinds waste rock for trace ore.
- `test/t_racks.js`: Rack intake, FIFO storage, gate, removal and saved-state validation.
- `test/t_silo_contents.js`: Stored snow keeps its identity and remains in the world's water budget.
- `test/t_sim_optimizations.js`: Optimized paths must match the full roof scan and the original heat loop exactly.
- `test/t_slope_belt_art.js`: Drawing geometry against real parts, without changing transport.
- `test/t_slope_belts.js`: Sloped belts: transport, joins, sorting, persistence and the actual drag controls.
+30
View File
@@ -4,6 +4,36 @@ 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-26: t38: show silo contents at the cursor and in a wide window (Codex)
- `src/ui/info.js`: contents were confined to the bottom info plate (hidden below 720 px),
omitted from cursor labels, and cone gaps lacked mach ownership. Hover now resolves the
full 12x24 outline and shows contents beside the cursor; physical footprints stay unchanged.
- `src/render/machines.js`: shared framed three-grain window in both looks, fixed pixel grain
noise, visible near-empty row, lifted dark fuel colours, and stencils fitted beside the glass.
`tools/scenes/silo.js` adds snow and one grain of coal. All 31 accepted powders checked.
- `test/t_silo_contents.js`: 5 checks confirm snow intake, identity, water accounting, warm
storage and release. `test/play.py` checks hover/label at five outline points empty/filled,
narrow HUD, fill pixels at zooms 2-12 and stable drawing for all powders in both looks.
- Opened and inspected `shots/t38-silos-{pixel,smooth}-z{2,4,8}.png`. Updated t38 and DESIGN;
regenerated PROJECT_MAP. Final `python3 test/run_all.py --browser`: ALL PASSED (26 headless
suites, 352 play checks, 15 smooth checks). Task moved to Review; owner playtest remains.
## 2026-10-26: t41: distant resonance-drill aim is normal (Codex)
- `src/ui/preview-drill.js`, `previews.js`: keep tuned fan and light crosshair, add a solid far
edge in pulse colour, remove the drill-only red reach circle. `info.js` omits drill distance
warnings; other tools retain their warning, including beside silo contents.
- `src/sim/drill.js`: removed only the distance status; too-hard/cannot-be-drilled wording and
`toolDig` are unchanged. Notebook drill text remains accurate; gamepad code untouched.
- `test/t_drill.js`: new distance regression failed before fix, now passes; two former warning
expectations updated intentionally. `test/play.py`: held mouse aim makes no toast/warning,
hard granite still toasts, no red reach circle, gamepad aim stays within reach.
- Opened and inspected `shots/t41-drill-beyond-reach.png`. Focused browser checks pass.
Initial full browser run exposed test timing/paused-input fixture mistakes, corrected without
changing gameplay. Final `python3 test/run_all.py --browser`: ALL PASSED (26 headless
suites, 352 play checks, 15 smooth checks). Updated t41 and DESIGN; moved to Review. No commit.
## 2026-10-26: t39: seal touching square-block corners (Codex)
- `cells.js`: six inline checks reject diagonal moves between two PH_SOLID neighbours, with