diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx index b550e2e..4a0401a 100644 --- a/src/data/layers/workshop.tsx +++ b/src/data/layers/workshop.tsx @@ -123,9 +123,6 @@ const layer = createLayer(id, function (this: BaseLayer) { )), visibility: () => showIf(Decimal.lt(foundationProgress.value, computedMaxFoundation.value)), canClick: () => { - if (Decimal.gt(computedMaxFoundation.value, foundationProgress.value)){ - foundationProgress.value = Decimal.min(0, computedMaxFoundation.value) - } if (Decimal.lt(trees.logs.value, foundationConversion.nextAt.value)) { return false; } @@ -146,6 +143,12 @@ const layer = createLayer(id, function (this: BaseLayer) { style: "width: 600px; min-height: unset" })); + watchEffect(() => { + if (Decimal.lt(computedMaxFoundation.value, foundationProgress.value)) { + foundationProgress.value = Decimal.min(0, computedMaxFoundation.value); + } + }); + const buildFoundationHK = createHotkey(() => ({ key: "w", description: "Build foundation",