mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-22 00:21:34 +00:00
fix negative trees bug
This commit is contained in:
parent
93ea38b589
commit
226962699a
1 changed files with 1 additions and 0 deletions
|
@ -762,6 +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;
|
||||
});
|
||||
|
||||
const netSaplingGain = computed(() =>
|
||||
|
|
Loading…
Reference in a new issue