Sloped walls with a flat 45° face, and diagonal wall lines (t36)

- New Sloped wall piece: a half-block triangle in any wall material, at half a wall's cost.
  Dragging walls or slopes at about 45° lays a diagonal line; the drag picks the slope's
  orientation and T flips or turns it.
- Each slope fills one cell past its corner, so a diagonal run is sealed against grains and water.
- New test/t_slopes.js: a slope funnel passes 400/400 sand (square steps 379/400).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 17:17:51 -04:00
co-authored by Claude Opus 5.5
parent 1a300bf744
commit 381019b7aa
21 changed files with 311 additions and 58 deletions
+16
View File
@@ -0,0 +1,16 @@
// A twelve-block funnel, one block open at the bottom, draining 400 grains of sand.
const fx = Math.floor((SX - 150) / BS), fy = Math.floor((SY - 36) / BS);
const cx = (fx + 12) * BS + 2, floor = (fy + 25) * BS;
for (let y = fy * BS - 45; y < floor + 8; y++) for (let x = fx * BS - 20; x < (fx + 25) * BS + 20; x++) {
const i = y * W + x;
bgm[i] = 0;
setCell(i, y >= floor ? STONE : EMPTY, 20, y >= floor ? F_NAT : 0);
}
for (let x = fx * BS - 20; x < (fx + 25) * BS + 20; x++) surfY[x] = floor;
for (let k = 0; k < 12; k++) {
placeBlock(BP_SLOPE_BL, RBRICK, fx + k, fy + k, true);
placeBlock(BP_SLOPE_BR, RBRICK, fx + 24 - k, fy + k, true);
}
for (let y = fy * BS - 28; y < fy * BS - 18; y++) for (let x = cx - 20; x < cx + 20; x++) setCell(y * W + x, SAND, 20, 0);
updateRoof();
window.CAM = [cx, fy * BS + 25];