Nozzle and rain count only their own grains in flight; factory launches uncapped (t95)

This commit is contained in:
2026-10-29 18:12:47 -04:00
parent 3b427aeecc
commit d936f65553
5 changed files with 62 additions and 3 deletions
+4 -1
View File
@@ -28,8 +28,11 @@ function worldWater() {
function absorbSteam(x) { if (chunkWork) { chunkEvent('moist', x); return; } const b = Math.min(weather.moist.length - 1, Math.max(0, (x / WBAND) | 0)); weather.moist[b] += 1; }
// Send about k drops (snowflakes where it is freezing) down from the clouds over x0..x1; returns how many fell
function spawnRain(x0, x1, k) {
if (flyers.length > 2500) return 0;
let airborne = 0;
for (const f of flyers) if (f.rain) airborne++;
if (airborne >= 2500) return 0;
let n = Math.floor(k) + (wrnd() < k - Math.floor(k) ? 1 : 0), made = 0;
n = Math.min(n, 2500 - airborne);
for (; n > 0; n--) {
const x = Math.floor(x0 + wrnd() * (x1 - x0));
if (x < 0 || x >= W) continue;