From 1bc299e50c9f3b2fe4a7a97e929a2895a9c12ada Mon Sep 17 00:00:00 2001 From: unsoftcapped3 <75136164+unsoftcapped3@users.noreply.github.com> Date: Fri, 23 Dec 2022 12:00:40 -0800 Subject: [PATCH] fix foundation going above what it should be --- src/data/layers/workshop.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/data/layers/workshop.tsx b/src/data/layers/workshop.tsx index 831761c..b550e2e 100644 --- a/src/data/layers/workshop.tsx +++ b/src/data/layers/workshop.tsx @@ -123,6 +123,9 @@ 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; }