Grains resting on anything built cast no shadow (t37)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 20:21:31 -04:00
co-authored by Claude Opus 5.5
parent 7d1be16094
commit f19facbe5c
4 changed files with 45 additions and 6 deletions
+1 -2
View File
@@ -8,8 +8,7 @@ function builtForLight(i, x, y) {
function looseForLight(i) {
for (let depth = 0; depth <= 12 && i < N; depth++, i += W) {
const m = mat[i], ph = PH[m];
if (m === BELTL || m === BELTR || part[i] === P_FILTER) return true;
if (part[i]) return false;
if (builtForLight(i, i % W, (i / W) | 0)) return true;
if (ph !== PH_POWDER && ph !== PH_LIQUID) return m === EMPTY || ph === PH_GAS;
}
return false;