uses computed not the modifier

This commit is contained in:
circle-gon 2022-12-16 09:17:47 -05:00 committed by GitHub
parent 33bd09e9bf
commit 9c5a31a81a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -762,7 +762,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
Decimal.times(computedAutoPlantingAmount.value, diff)
);
saplings.value = Decimal.sub(saplings.value, amountPlanted);
if(Decimal.gte(saplings.value, totalTrees.value)) saplings.value = totalTrees.value;
if(Decimal.gte(saplings.value, computedTotalTrees.value)) saplings.value = computedTotalTrees.value;
});
const netSaplingGain = computed(() =>