From ec71587eabf25128417a8184a407a47b58ab5b1a Mon Sep 17 00:00:00 2001 From: ducdat0507 <62660527+ducdat0507@users.noreply.github.com> Date: Fri, 23 Dec 2022 20:40:31 +0700 Subject: [PATCH] NaNi? --- src/data/layers/factory.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index d0b3b07..0eeda6f 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -206,7 +206,7 @@ const factory = createLayer(id, () => { createMultiplicativeModifier(() => ({ multiplier: Decimal.lt(energyEfficiency.value, 1) ? 1 - : Decimal.sub(2, Decimal.div(energyConsumption.value, computedEnergy.value)), + : Decimal.sub(2, Decimal.div(energyConsumption.value, Decimal.max(computedEnergy.value, 1))), description: "Brighter work rooms", enabled: () => upgrades[2][0].bought.value })), @@ -1387,7 +1387,6 @@ const factory = createLayer(id, () => { const now = Date.now(); const diff = (now - compData.lastFactoryProd) / 1000; compData.lastProdTimes.push(diff); - console.log(compData.lastProdTimes); if (compData.lastProdTimes.length > 10) compData.lastProdTimes.shift(); compData.lastFactoryProd = now; }