mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-21 16:13:57 +00:00
Don't reset foundation progress when loading save
This commit is contained in:
parent
1ab77440fb
commit
29594391a6
1 changed files with 5 additions and 1 deletions
|
@ -30,6 +30,7 @@ import {
|
||||||
import { noPersist, persistent } from "game/persistence";
|
import { noPersist, persistent } from "game/persistence";
|
||||||
import Decimal, { DecimalSource, formatWhole } from "util/bignum";
|
import Decimal, { DecimalSource, formatWhole } from "util/bignum";
|
||||||
import { Direction, WithRequired } from "util/common";
|
import { Direction, WithRequired } from "util/common";
|
||||||
|
import { loadingSave } from "util/save";
|
||||||
import { render } from "util/vue";
|
import { render } from "util/vue";
|
||||||
import { computed, ref, unref, watchEffect } from "vue";
|
import { computed, ref, unref, watchEffect } from "vue";
|
||||||
import elves from "./elves";
|
import elves from "./elves";
|
||||||
|
@ -144,7 +145,10 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (Decimal.lt(computedMaxFoundation.value, foundationProgress.value)) {
|
if (
|
||||||
|
!loadingSave.value &&
|
||||||
|
Decimal.lt(computedMaxFoundation.value, foundationProgress.value)
|
||||||
|
) {
|
||||||
foundationProgress.value = Decimal.min(0, computedMaxFoundation.value);
|
foundationProgress.value = Decimal.min(0, computedMaxFoundation.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue