Water pours off ledges several times faster, raining clouds spread boiled-off water (t21)
- Liquids step up to 8 cells a tick toward a drop (fewer the thicker they are), and a top-layer grain looks 4 times as far for one, so pools empty and thin film drains. A 100-wide pool empties in about 50 s; the old code left 24-650 grains stranded on wide ledges. - Only a top-layer grain stepping sideways wakes the row ahead, so settled lakes still sleep. - World generation settles at the old speed: seeds make the same worlds as before. - Cooled steam under a roof no longer stays steam for ever (its heat area slept). - Raining clouds keep drifting at half pace and rain over a band either side, so a waterfall into a hot shaft no longer rains straight back on its own lake. - New test/t_water.js; t_weather rain-location checks; t_conveyors counts steam in flight; t_molds seeds the random burning-bed check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+6
-4
@@ -71,15 +71,17 @@ function weatherTick() {
|
||||
if (sh.left !== undefined) { sh.left -= made; if (sh.left <= 0 && sh.until > tick) sh.until = tick; } // made up the shortfall: it passes
|
||||
}
|
||||
}
|
||||
// clouds made of your steam build up, then rain it back out where they hang
|
||||
// clouds made of your steam build up, then rain it back out over where they hang and a band
|
||||
// either side, so water boiled off one spot does not all fall back on it
|
||||
for (let b = 0; b < n; b++) {
|
||||
if (!w.raining[b] && w.moist[b] > 150) w.raining[b] = 1;
|
||||
if (w.raining[b]) { w.moist[b] -= spawnRain(b * WBAND, (b + 1) * WBAND, Math.min(3, 0.5 + w.moist[b] / 100)); if (w.moist[b] < 12) w.raining[b] = 0; }
|
||||
if (w.raining[b]) { w.moist[b] -= spawnRain(Math.max(0, (b - 1) * WBAND), Math.min(W, (b + 2) * WBAND), Math.min(3, 0.5 + w.moist[b] / 100)); if (w.moist[b] < 12) w.raining[b] = 0; }
|
||||
}
|
||||
// and drift a little downwind every second; at the edge of the world they pile up instead
|
||||
// and drift a little downwind every second, raining ones at half the pace; at the edge of the
|
||||
// world they pile up instead
|
||||
if (tick % 60 === 0) {
|
||||
const out = new Float32Array(n), d = w.wind > 0 ? 1 : -1, f = Math.min(0.12, Math.abs(w.wind) * 0.1);
|
||||
for (let b = 0; b < n; b++) { const mv = w.raining[b] ? 0 : w.moist[b] * f; out[b] += w.moist[b] - mv; if (b + d >= 0 && b + d < n) out[b + d] += mv; else out[b] += mv; }
|
||||
for (let b = 0; b < n; b++) { const mv = w.moist[b] * f * (w.raining[b] ? 0.5 : 1); out[b] += w.moist[b] - mv; if (b + d >= 0 && b + d < n) out[b + d] += mv; else out[b] += mv; }
|
||||
w.moist = out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user