Cooled magma is ordinary rock: visible in the smooth look and drillable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 15:43:20 -04:00
co-authored by Claude Opus 5.5
parent ccca66c0c1
commit 54e7756ead
6 changed files with 56 additions and 5 deletions
+32
View File
@@ -139,4 +139,36 @@ run('for (let y = 80; y < 100; y++) for (let x = 120; x < 122; x++) bgm[y * W +
hold(121, 92, 1, 0, 3);
check('a tree trunk in the path is cut into wood chunks', count(run, run('LWOOD')) > 0, count(run, run('LWOOD')));
// Melts that cool loose in the world (magma from the bag, metal spilled outside a mold) are
// ordinary solids the drill can break; built walls, slope corner cells and molds stay protected.
flatWorld(run, 160, 128, 120);
const melt = run(`(() => {
player.bitTier = BIT_TIERS.length - 1; bot.x = 60; bot.y = 60;
for (let y = 80; y < 88; y++) for (let x = 60; x < 72; x++) setCell(y * W + x, MAGMA, 1250, 0);
for (let k = 0; k < 2400; k++) simTick();
for (let x = 90; x < 96; x++) setCell(110 * W + x, COPPER, 20, F_CAST); // metal that set outside a mold
let bas = 0, nat = 0, cu = 0, drillable = 0, cuDrill = 0;
for (let i = 0; i < N; i++) {
if (mat[i] === BASALT) { bas++; if (flags[i] & F_NAT) nat++; if (crumbly(i)) drillable++; }
if (mat[i] === COPPER) { cu++; if (crumbly(i)) cuDrill++; }
}
return { bas, nat, drillable, cu, cuDrill };
})()`);
check('magma from the bag cools into natural basalt', melt.bas > 0 && melt.nat === melt.bas, JSON.stringify(melt));
check('that basalt can be drilled', melt.drillable === melt.bas, JSON.stringify(melt));
check('copper that set outside a mold can be drilled for scrap', melt.cu > 0 && melt.cuDrill === melt.cu, JSON.stringify(melt));
check('basalt already stuck without the natural mark can be drilled too',
run('(() => { setCell(20 * W + 20, BASALT, 20, 0); player.bitTier = BIT_TIERS.length - 1; return crumbly(20 * W + 20); })()'));
check('built walls and slope corner cells stay safe from the drill', run(`(() => {
placeBlock(BP_WALL, RSTONE, 5, 5, true); placeBlock(BP_SLOPE_BL, RSTONE, 8, 5, true);
const wallCell = 5 * BS * W + 5 * BS + 1; let seal = -1;
for (let i = 0; i < N; i++) if (slopeSealOwner(i) >= 0 && PH[mat[i]] === PH_SOLID) { seal = i; break; }
return !crumbly(wallCell) && (seal < 0 || !crumbly(seal));
})()`));
check('a mold and what sets inside it stay safe from the drill', run(`(() => {
bag[RSTONE] = 400; bagTotal = 400; const err = placeMoldAt('ingot', 30, 10, RSTONE);
const mo = molds[molds.length - 1]; if (err || !mo) return false;
for (const i of moldCellsAt(mo.kind, mo.x, mo.y).walls) if (crumbly(i)) return false;
return true;
})()`));
done();