Brick press: clay lumps into green bricks that fire into Bricks (t28)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 16:55:54 -04:00
co-authored by Claude Opus 5.5
parent b76f4516b7
commit c7256557bb
19 changed files with 102 additions and 40 deletions
+16 -1
View File
@@ -74,6 +74,21 @@ function feedHopper(m, n, bottom = 76, clearItems = true) {
for (let t = 0; t < 4; t++) { tick++; tickStamp++; procBlocksTick(); }
}`);
}
hopper('BP_PRESS'); run('stats.pressed = 0;'); feedHopper('LCLAY', 8);
check('a Brick press makes one green brick from eight clay lumps', run('stats.pressed === 1 && ents.length === 1 && ents[0].m === GREENB && ents[0].iy === 76 && seen[GREENB]'));
feedHopper('CUORE', 1);
check('a Brick press passes other grains through', run('mat[76*W+81] === CUORE && temp[76*W+81] === 60'));
check('two fired bricks build a brick wall block', run('WALL_OF[BARBR] === BRICK') && JSON.stringify(run('wallCost(BARBR, 16)')) === JSON.stringify([[run('BARBR'), 2]]));
hopper('BP_PRESS'); run('stats.pressed = 0;'); feedHopper('LCLAY', 7);
run('setCell(77*W+80, STONE, 20, 0); setCell(71*W+80, LCLAY, 20, 0); stamp[71*W+80] = 0; for (let k = 0; k < 8; k++) { tick++; tickStamp++; procBlocksTick(); }');
check('a press waits until a whole brick fits underneath', run('mat[71*W+80] === LCLAY && procState.get(18*BW+20).press === 7 && procState.get(18*BW+20).blocked && stats.pressed === 0'));
hopper('BP_PRESS', true); feedHopper('LCLAY', 8, 80);
check('a green brick drops below a press and Grinder stack', run('ents.length === 1 && ents[0].m === GREENB && ents[0].iy === 80'));
for (const heat of [1000, 500]) {
flatWorld(run, 240, 160, 100);
run(`spawnBar(GREENB, 80, 98, 0, 0, ${heat}); for (let k = 0; k < 2000; k++) { temp.fill(${heat}); simTick(); }`);
check(`a green brick at ${heat}°C ${heat === 1000 ? 'fires' : 'stays unfired'}`, run(`ents.length === 1 && ents[0].m === ${heat === 1000 ? 'BARBR' : 'GREENB'} && occ[ents[0].iy*W+ents[0].ix] === 1`));
}
hopper('BP_SAW'); feedHopper('RSTONE', 8);
check('a Saw cuts eight stone grains into one stone block below', run('stats.bricks === 1 && ents[0].iy === 76'));
hopper('BP_SAW'); feedHopper('LWOOD', 8);
@@ -131,7 +146,7 @@ for (const [type, refund] of [['refiner', 120], ['cutter', 90], ['unknown', 0]])
// ---- builders' orders: bulk rubble, gravel and stone blocks at a few times a tiny price
flatWorld(run, 240, 160, 100);
run('seen[PLANK] = 0; seen[RSTONE] = 1; seen[GRAVEL] = 1; seen[BARSB] = 1; orders = []; ordersDone = 0;');
run('seen[BARBR] = 0; seen[PLANK] = 0; seen[RSTONE] = 1; seen[GRAVEL] = 1; seen[BARSB] = 1; orders = []; ordersDone = 0;');
const os = JSON.parse(run('JSON.stringify(Array.from({ length: 40 }, () => makeBuildersOrder()))'));
const okOrders = os.every(o => o && o.who === 'Builders' && [run('RSTONE'), run('GRAVEL'), run('SAND'), run('BARSB')].includes(o.m) && o.pay > 0 && o.pay < 400);
check("builders post orders for rubble, gravel and stone blocks that pay a little", okOrders, os.slice(0, 4).map(o => `${o.qty} of ${o.m} for $${o.pay}`).join(', '));