fix foundation going above what it should be

This commit is contained in:
unsoftcapped3 2022-12-23 12:00:40 -08:00 committed by GitHub
parent 4b9b2f263a
commit 1bc299e50c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}