Make setupPassiveGeneration not lower the resource

This commit is contained in:
thepaperpilot 2022-12-25 18:53:27 -06:00
parent 2122103c0e
commit 166c2d34b4

View file

@ -460,7 +460,9 @@ export function setupPassiveGeneration(
conversion.gainResource.value = Decimal.add(
conversion.gainResource.value,
Decimal.times(currRate, diff).times(Decimal.ceil(unref(conversion.actualGain)))
).min(unref(processedCap) ?? Decimal.dInf);
)
.min(unref(processedCap) ?? Decimal.dInf)
.max(conversion.gainResource.value);
}
});
}