Fix stuff

This commit is contained in:
ducdat0507 2022-12-05 23:20:39 +07:00
parent 73e92610a7
commit 710dc62504
2 changed files with 5 additions and 5 deletions

View file

@ -624,7 +624,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
trees.value,
Decimal.times(computedAutoCuttingAmount.value, diff)
);
const logsGained = logGain.apply(1).mul(amountCut);
const logsGained = Decimal.mul(logGain.apply(1), amountCut);
const effectiveLogsGained = Decimal.div(logsGained, diff);
ema.value = Decimal.mul(effectiveLogsGained, SMOOTHING_FACTOR).add(
@ -712,9 +712,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
productionDisplay={
Decimal.gt(computedAutoCuttingAmount.value, 0)
? `+${format(ema.value)}/s average<br/>equilibrium: +${formatLimit([
[logGain.apply(1).mul(computedAutoCuttingAmount.value), "cutting speed"],
[logGain.apply(1).mul(computedAutoPlantingAmount.value), "planting speed"],
[logGain.apply(1).mul(Decimal.mul(computedTotalTrees.value, 20)), "forest cap"]
[Decimal.mul(logGain.apply(1), computedAutoCuttingAmount.value), "cutting speed"],
[Decimal.mul(logGain.apply(1), computedAutoPlantingAmount.value), "planting speed"],
[Decimal.mul(logGain.apply(1), Decimal.mul(computedTotalTrees.value, 20)), "forest cap"]
], "/s")}`
: undefined
}

View file

@ -16,7 +16,7 @@ import {
import { jsx, showIf } from "features/feature";
import { createHotkey } from "features/hotkey";
import { createMilestone } from "features/milestones/milestone";
import { createResource, displayResource, } from "features/resources/resource";
import { createResource, displayResource, Resource } from "features/resources/resource";
import { BaseLayer, createLayer } from "game/layers";
import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
import { Direction } from "util/common";