Bar rack blocks: store 50 bars each, F lets them out oldest first (t1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -216,6 +216,12 @@ above, including:
|
||||
brick pattern so piles have no air gaps; a Bar rack machine (the Silo for bars) takes them from
|
||||
a belt or tube, counts them and lets them out with F. The owner wanted bar storage that doesn't
|
||||
waste space, like stacked ingots in real life.
|
||||
As built: a resting bar snaps to a 2-grain grid, and one with fewer than 2 of its 4 bottom cells
|
||||
supported tips into the gap beside it. Storage became Rack blocks rather than a machine, like
|
||||
the t4 hoppers: 50 bars of any kind per block, a column is one rack; bars landing on top go in
|
||||
(into the lowest block with room), F opens the gate at the bottom of the column, and bars come
|
||||
out oldest first, one every 20 ticks, onto whatever is below. Taking a block back returns its
|
||||
bars.
|
||||
- **Hopper blocks replace hopper machines (t4).** 1-block Grinder and Saw blocks each work what
|
||||
lands on them and drop it below, so a wider row is a wider, faster hopper. The Refiner and Stone
|
||||
cutter leave the build menu; built ones in old saves keep working. The owner wanted hoppers of
|
||||
|
||||
+18
-12
@@ -196,15 +196,15 @@ Deepgrain Foundry: simulation core (src/sim/). No DOM anywhere in src/sim/: plai
|
||||
- functions: rnd, mulberry32, hash2
|
||||
- variables: RS, PH_EMPTY, PH_SOLID, PH_POWDER, PH_LIQUID, PH_GAS, PH_ITEM
|
||||
|
||||
### src/sim/materials.js (167 lines)
|
||||
### src/sim/materials.js (168 lines)
|
||||
Material ids, the material table (def), per-material property arrays, cell flags and part ids, and drill/tank tiers.
|
||||
- functions: def, metalFamily
|
||||
- variables: EMPTY, GRASS, DIRT, LDIRT, SAND, GRAVEL, CLAY, STONE, GRANITE, BASALT, NMAT, MD, FIRETO, PH, DENS, KC, ICAP, CASTMETAL, METAL_TIER, SOLIDMETAL, F_NAT, F_CAST, F_BURN, P_NONE, P_TU, P_TD, P_TL, P_TR, P_GRATE, P_GOPEN, P_WHEEL, P_INTAKE, P_FILTER, P_PIPE, TDX, TDY, BIT_TIERS, TANK_TIERS, REACH
|
||||
|
||||
### src/sim/pieces.js (141 lines)
|
||||
### src/sim/pieces.js (143 lines)
|
||||
Everything the player can build (PIECES): blocks, machines and molds, with costs and descriptions; filter settings; wall materials and their cost.
|
||||
- functions: isPipeCode, filterable, cleanFilterCfg, filterRec, filterPassAt, filterInfo, sameFilter, wallCost
|
||||
- variables: BS, BP_WALL, BP_BELT, BP_TUBE, BP_SHAFT, BP_GRATE, BP_GATE, BP_FILTER, BP_PIPE, BP_PUMP, BP_OUTLET, BP_GRIND, BP_SAW, BP_PRESS, filterCfg, WALL_OF, WALL_LIST, BAR_OF, GRAINS_PER_BAR, POWER_FREE, CASH, PIECES, PIECE_BY_ID, PIECE_BY_CODE, BELT_POWER, TUBE_POWER, FAN_POWER, WHEEL_K, ENGINE_K, MOLDS
|
||||
- variables: BS, BP_WALL, BP_BELT, BP_TUBE, BP_SHAFT, BP_GRATE, BP_GATE, BP_FILTER, BP_PIPE, BP_PUMP, BP_OUTLET, BP_GRIND, BP_SAW, BP_PRESS, BP_RACK, filterCfg, WALL_OF, WALL_LIST, BAR_OF, GRAINS_PER_BAR, POWER_FREE, CASH, PIECES, PIECE_BY_ID, PIECE_BY_CODE, BELT_POWER, TUBE_POWER, FAN_POWER, WHEEL_K, ENGINE_K, MOLDS
|
||||
|
||||
### src/sim/economy.js (152 lines)
|
||||
Money, prices, market saturation, the trade dock, buyer and builder orders.
|
||||
@@ -246,12 +246,17 @@ Processing: Grinder and Saw blocks, and the Silo.
|
||||
- functions: isProcCode, rebuildProcessors, procBottom, procSlot, procFeed, procBlocksTick, siloTick, siloFull
|
||||
- variables: REFINE, REFINE_SAND, CUT_PER_BRICK, SAW_CUTS, procState, procBlocks, procDirty, SILO_CAP, SILO_RATE
|
||||
|
||||
### src/sim/racks.js (56 lines)
|
||||
Each rack block owns its bars; only the bottom of a column releases them.
|
||||
- functions: newRack, rackTop, rackBottom, rackPush, rackShift, rackIntake, rackRefill, rackTick
|
||||
- variables: RACK_CAP, rackState
|
||||
|
||||
### src/sim/pipes.js (114 lines)
|
||||
Pipes, pumps and outlets: each joined line holds one liquid as a count, not as grains.
|
||||
- functions: sideOf, pipeClosedSide, pipeJoins, rebuildPipes, pipeNetOf, pipeTakeShare, faceCell, pumpDraw, outletPour, pipesTick
|
||||
- variables: PIPE_CAP, PUMP_RATE, OUTLET_RATE, PUMP_MAX_T, SIDE_V, PUMP_V, OUTLET_V, pipeNets, pipeNetAt, pipesDirty
|
||||
|
||||
### src/sim/machine-tick.js (163 lines)
|
||||
### src/sim/machine-tick.js (164 lines)
|
||||
Per-tick machine work: steam engines, fans, belts, filters, screw tubes (machinesTick).
|
||||
- functions: engineIntake, fanBlow, machinesTick
|
||||
|
||||
@@ -260,7 +265,7 @@ How belts, filters and screw tubes move what is on or in them. What rests on a b
|
||||
- functions: carryColumn, beltDrain, launchGrain, rebuildFilters, filterCarry, setFilter, filterRun, roomFor, tubeSpread, tubeIntake
|
||||
- variables: CARRY_DEPTH, filterR, filterL, filtersDirty
|
||||
|
||||
### src/sim/blocks.js (136 lines)
|
||||
### src/sim/blocks.js (149 lines)
|
||||
Building blocks: placing, integrity, removing, lines and rectangles of blocks.
|
||||
- functions: blockOf, blockCellList, pieceCost, canPlaceBlock, placeBlock, blockIntegrity, removeBlock, blockLine, blockRect, blockInReach, blockIs, placeBlocks
|
||||
|
||||
@@ -269,7 +274,7 @@ Molds: cavities for castings; ingot troughs empty themselves below. Removal retu
|
||||
- functions: moldCellsAt, canPlaceMold, newMoldRecord, addMold, castMix, cavityState, troughState, clearCavity, moldPlugCells, rakeAbove, furnaceJunkHint, unplugMold, ejectIngot, checkMolds, moldAt, tally, collectMold, removeMold
|
||||
- variables: DROSS, grains, barWord
|
||||
|
||||
### src/sim/items.js (224 lines)
|
||||
### src/sim/items.js (225 lines)
|
||||
Bars and other loose objects (ents), and the bag: adding, taking, costs and refunds.
|
||||
- functions: entSolidCell, entSupportCount, entFreeAt, entMark, spawnBar, removeEnt, entTubeAt, entTubeFree, entTubeMove, entTubeEnter, entTubeTick, entTick, entsInCircle, bagAdd, bagTake, giveOrDrop, refundAt, canAfford, payCost, fmtMoney, costText, needText
|
||||
- variables: BAR_W, BAR_H, entCurM, droppedLast
|
||||
@@ -293,7 +298,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
|
||||
- variables: blowRR, FLY_G, FLY_Q
|
||||
|
||||
### src/sim/actions.js (87 lines)
|
||||
### src/sim/actions.js (92 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.
|
||||
- functions: removePieceAt, removePieceAt0, placeMachineAt, placeMoldAt, toggleGateAt, interactAt
|
||||
|
||||
@@ -329,7 +334,7 @@ World generation: noise, layers, ores, caves, water, trees, and clearing tiny ha
|
||||
- functions: makeNoise, fbm, clearHardSpecks, generateWorld, generateWorldAsync
|
||||
- variables: SPECK_MIN
|
||||
|
||||
### src/sim/save.js (126 lines)
|
||||
### src/sim/save.js (141 lines)
|
||||
Saving and loading a world (serializeWorld / deserializeWorld) and old-save migration.
|
||||
- functions: serializeWorld, deserializeWorld
|
||||
- variables: SAVE_VERSION, TOFF
|
||||
@@ -348,9 +353,9 @@ Scale colour without changing the smooth-look class.
|
||||
- functions: fogColor, drawWorld
|
||||
- variables: TUBE_CLASS
|
||||
|
||||
### src/render/machines.js (212 lines)
|
||||
### src/render/machines.js (242 lines)
|
||||
Machine overlays: fans, engines, silo and the rest, drawn on top of the world.
|
||||
- functions: cellRect, drawHazardRims, drawMachines, drawProcBlocks, drawSilo, drawSiloPixel
|
||||
- functions: cellRect, drawHazardRims, drawMachines, drawProcBlocks, drawSilo, drawSiloPixel, drawRackBlocks
|
||||
|
||||
### src/render/overlays.js (229 lines)
|
||||
Other overlays: floating text, rain and snow, flow arrows, filter tags, molds, the bot, particles.
|
||||
@@ -404,7 +409,7 @@ The notebook (N): milestones, market, wallet, blueprints, controls.
|
||||
The tool hotbar and what is selected.
|
||||
- functions: renderHotbar, toolId, steering, modShift, grainAt, selectTool, bagMaterials, blowList, blowAllList, blowingAll, piece
|
||||
|
||||
### src/ui/build-menu.js (103 lines)
|
||||
### src/ui/build-menu.js (104 lines)
|
||||
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
|
||||
@@ -414,7 +419,7 @@ The selected tool and piece: R / Q / E, drill width, filter picker, the selectio
|
||||
- functions: pieceUsesWall, setDrillWidth, tuneUnderCursor, cycleItem, cycleWall, rotate, toggleBlow, pickFilterUnderCursor, toggleFilterMat, setBrush, pieceV, pieceExtra, filterChoices, matList, filterParts, filterSentence, applyFilterRun, openFilterPicker, openWallPicker, filterBlockAt, chipCost, pieceCostNow, renderSelCard, renderBag
|
||||
- variables: lastBagKey
|
||||
|
||||
### src/ui/info.js (174 lines)
|
||||
### src/ui/info.js (186 lines)
|
||||
Discovery cards, hover info (I) and the cursor label.
|
||||
- functions: showCard, howText, discoveryCard, reactionsOf, hoverInfo, renderInfo, drawCursorLabel
|
||||
|
||||
@@ -468,6 +473,7 @@ The frame loop and boot.
|
||||
- `test/t_furnace_repeat.js`: The starter furnaces keep working when fired again and again without cleaning, however the charge goes in: mixed, ore first with coal on top, or blown in through the vent. Each case plays furnace_play.js, which builds the design and fires it like a player.
|
||||
- `test/t_molds.js`: Molds and furnaces stay usable: ingots drop below and keep their stubs, plugs over molds are cleared, spoiled castings can be knocked out, grains never drop through a grate by teleporting, and slag lets the fire breathe.
|
||||
- `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_smooth.py`: The smooth look: the WebGL pass compiles, draws, falls back cleanly, and the thermal lens still works.
|
||||
- `test/t_stone.js`: Uses for waste rock and sand: glass bricks from a fan furnace, the Saw, the silo and builders' orders.
|
||||
- `test/t_weather.js`: Weather: no more springs; steam rises into clouds and rains back; showers; snow when it is freezing.
|
||||
|
||||
@@ -4,6 +4,16 @@ 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-24: t1: bars stack neatly, Rack blocks store them (Claude Code, Codex)
|
||||
|
||||
- `232f5af`: `entTick` snap-and-tip (`entSupportCount`, `src/sim/items.js`);
|
||||
`test/t_bar_stacking.js` (12 bars fill a pit's bottom six rows; fails on the old code).
|
||||
- Rack blocks: `src/sim/racks.js` (`rackState` per block, FIFO runs, `rackIntake` from `entTick`,
|
||||
`rackTick` release, `rackRefill`), `BP_RACK`/`RACKB`, F toggle in `interactAt`, removal returns
|
||||
bars with `giveOrDrop`, saved in meta `racks` and validated on load, shelves overlay, hover,
|
||||
Machines tab, notebook. `test/t_racks.js` (29 checks), play.py menu check.
|
||||
- Tests: `run_all.py --browser` ALL PASSED. Screenshot `shots/t1-racks.png`.
|
||||
|
||||
## 2026-10-24: Backlog combined and rewritten (Claude Code)
|
||||
|
||||
- On the owner's request: t12 (exotic ores) and t31 (choosing claims) merged into t13, now
|
||||
|
||||
Reference in New Issue
Block a user