Dev console: money, items, upgrades, free build, speed (t66)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 14:30:37 -04:00
co-authored by Claude Opus 5.5
parent 02e338a46f
commit dd8068dfe6
19 changed files with 400 additions and 23 deletions
+1
View File
@@ -91,6 +91,7 @@ function pieceExtra(P) { return P.filter ? { m: GAME.filterCfg.m.slice(), inv: G
function filterBlockAt(x, y) { if (x < 0 || y < 0 || x >= W || y >= H) return -1; const b = ((y / BS) | 0) * BW + ((x / BS) | 0); return isFilter(blockP[b]) ? b : -1; }
function chipCost(cost) { const ok = canAfford(cost, 1); return `<span class="chip ${ok ? 'ok' : 'bad'}">${esc(costText(cost, 1))}</span>`; }
function pieceCostNow(P, m = GAME.wallMat) {
if (devFree) return [[CASH, 0]];
if (P.kind === 'mold') return wallCost(m, MOLDS[P.mold].walls);
if (P.kind === 'block' && isWall(P.code)) return pieceCost(pieceCode(P), m);
return P.cost;