mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-25 01:41:44 +00:00
Fix repeatables not buying max correctly
This commit is contained in:
parent
6c618a1889
commit
b6a3c49cc5
1 changed files with 8 additions and 3 deletions
|
@ -158,7 +158,8 @@ export function createRepeatable<T extends RepeatableOptions>(
|
|||
)
|
||||
),
|
||||
requiresPay: false,
|
||||
visibility: Visibility.None
|
||||
visibility: Visibility.None,
|
||||
canMaximize: true
|
||||
} as const;
|
||||
const visibilityRequirement = createVisibilityRequirement(repeatable as GenericRepeatable);
|
||||
if (isArray(repeatable.requirements)) {
|
||||
|
@ -199,8 +200,12 @@ export function createRepeatable<T extends RepeatableOptions>(
|
|||
if (!unref(genericRepeatable.canClick)) {
|
||||
return;
|
||||
}
|
||||
payRequirements(repeatable.requirements, unref(repeatable.amountToIncrease));
|
||||
genericRepeatable.amount.value = Decimal.add(genericRepeatable.amount.value, 1);
|
||||
const amountToIncrease = unref(repeatable.amountToIncrease) ?? 1;
|
||||
payRequirements(repeatable.requirements, amountToIncrease);
|
||||
genericRepeatable.amount.value = Decimal.add(
|
||||
genericRepeatable.amount.value,
|
||||
amountToIncrease
|
||||
);
|
||||
onClick?.(event);
|
||||
};
|
||||
processComputable(repeatable as T, "display");
|
||||
|
|
Loading…
Reference in a new issue