mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-01-31 15:41:37 +00:00
Fix infinite recursion
This commit is contained in:
parent
872d6208b6
commit
2803a99736
1 changed files with 4 additions and 4 deletions
|
@ -329,9 +329,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
]) as WithRequired<Modifier, "description" | "revert">;
|
]) as WithRequired<Modifier, "description" | "revert">;
|
||||||
const computedAutoCuttingAmount = computed(() => autoCuttingAmount.apply(0));
|
const computedAutoCuttingAmount = computed(() => autoCuttingAmount.apply(0));
|
||||||
const lastAutoCuttingAmount = ref<DecimalSource>(0);
|
const lastAutoCuttingAmount = ref<DecimalSource>(0);
|
||||||
watch(computedAutoCuttingAmount, cut => {
|
setInterval(() => watch(computedAutoCuttingAmount, cut => {
|
||||||
lastAutoCuttingAmount.value = cut;
|
lastAutoCuttingAmount.value = cut;
|
||||||
});
|
}), 0);
|
||||||
|
|
||||||
const manualPlantingAmount = createSequentialModifier(() => [
|
const manualPlantingAmount = createSequentialModifier(() => [
|
||||||
createAdditiveModifier(() => ({
|
createAdditiveModifier(() => ({
|
||||||
|
@ -420,9 +420,9 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
]) as WithRequired<Modifier, "description" | "revert">;
|
]) as WithRequired<Modifier, "description" | "revert">;
|
||||||
const computedAutoPlantingAmount = computed(() => autoPlantingAmount.apply(0));
|
const computedAutoPlantingAmount = computed(() => autoPlantingAmount.apply(0));
|
||||||
const lastAutoPlantedAmount = ref<DecimalSource>(0);
|
const lastAutoPlantedAmount = ref<DecimalSource>(0);
|
||||||
watch(computedAutoPlantingAmount, planted => {
|
setInterval(() => watch(computedAutoPlantingAmount, planted => {
|
||||||
lastAutoPlantedAmount.value = planted;
|
lastAutoPlantedAmount.value = planted;
|
||||||
});
|
}), 0);
|
||||||
|
|
||||||
const logGain = createSequentialModifier(() => [
|
const logGain = createSequentialModifier(() => [
|
||||||
createMultiplicativeModifier(() => ({
|
createMultiplicativeModifier(() => ({
|
||||||
|
|
Loading…
Add table
Reference in a new issue