Buildings cast no shadows: daylight passes player-built pieces (t37)

The lighting finds its own roof per column, skipping walls, belts, tubes, machines and molds,
and lets light through them like air, in both looks. Natural rock still shades; the
simulation's roof (steam condensing under a built roof) is unchanged. New test/t_light.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 16:42:07 -04:00
co-authored by Claude Opus 5.5
parent 5ce44f842e
commit 20d0627d75
5 changed files with 94 additions and 5 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ function drawWorld() {
else cl = 5;
}
top = cl << 24;
fpx[row + bx] = (tb ? 0xff000000 : 0) | (cl === 5 ? 0xff0000 : 0) | (cl === 3 ? 0xff00 : 0) | (cl === 1 || cl === 4 || cl === 6 ? 0xff : 0);
fpx[row + bx] = (tb ? 0xff000000 : 0) | (cl === 5 ? 0xff0000 : 0) | (cl === 3 ? 0xff00 : 0) | (cl === 1 && !builtForLight(i, x, y) ? 0xff : 0);
}
if (fv < 255) {
const k = fv / 255; r *= k; g *= k; b *= k;