Make setupPassiveGeneration not lower the resource

This commit is contained in:
thepaperpilot 2022-12-25 18:53:27 -06:00
parent 96263d8bc9
commit b5bc37c36a

View file

@ -464,7 +464,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);
}
});
}