mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-24 01:11:49 +00:00
fix foundation going above what it should be
This commit is contained in:
parent
4b9b2f263a
commit
1bc299e50c
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue