This commit is contained in:
ducdat0507 2022-12-23 20:40:31 +07:00
parent d1a02cd394
commit ec71587eab

View file

@ -206,7 +206,7 @@ const factory = createLayer(id, () => {
createMultiplicativeModifier(() => ({ createMultiplicativeModifier(() => ({
multiplier: Decimal.lt(energyEfficiency.value, 1) multiplier: Decimal.lt(energyEfficiency.value, 1)
? 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", description: "Brighter work rooms",
enabled: () => upgrades[2][0].bought.value enabled: () => upgrades[2][0].bought.value
})), })),
@ -1387,7 +1387,6 @@ const factory = createLayer(id, () => {
const now = Date.now(); const now = Date.now();
const diff = (now - compData.lastFactoryProd) / 1000; const diff = (now - compData.lastFactoryProd) / 1000;
compData.lastProdTimes.push(diff); compData.lastProdTimes.push(diff);
console.log(compData.lastProdTimes);
if (compData.lastProdTimes.length > 10) compData.lastProdTimes.shift(); if (compData.lastProdTimes.length > 10) compData.lastProdTimes.shift();
compData.lastFactoryProd = now; compData.lastFactoryProd = now;
} }