BUGFIX: Cannot buy augmentations via UI when money is equal to cost (#2039)

This commit is contained in:
catloversg
2025-03-21 05:50:35 +07:00
committed by GitHub
parent e8f9882e2d
commit c251a23a0e
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ export function AugmentationsPage({ faction }: { faction: Faction }): React.Reac
const repCost = augCosts.repCost;
const hasReq = faction.playerReputation >= repCost;
const hasRep = hasAugmentationPrereqs(aug);
const hasCost = augCosts.moneyCost !== 0 && Player.money > augCosts.moneyCost;
const hasCost = augCosts.moneyCost !== 0 && Player.money >= augCosts.moneyCost;
return hasCost && hasReq && hasRep;
}
const buy = augs.filter(canBuy).sort((augName1, augName2) => {
@@ -243,7 +243,7 @@ export function AugmentationsPage({ faction }: { faction: Faction }): React.Reac
return (
hasAugmentationPrereqs(aug) &&
faction.playerReputation >= costs.repCost &&
(costs.moneyCost === 0 || Player.money > costs.moneyCost)
(costs.moneyCost === 0 || Player.money >= costs.moneyCost)
);
}}
purchaseAugmentation={(aug, showModal) => {