From 166c2d34b4c993a1ecd650b2d09b89a150ece8bf Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 25 Dec 2022 18:53:27 -0600 Subject: [PATCH] Make setupPassiveGeneration not lower the resource --- src/features/conversion.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/features/conversion.ts b/src/features/conversion.ts index 476bfb9..97637fa 100644 --- a/src/features/conversion.ts +++ b/src/features/conversion.ts @@ -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); } }); }