mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
BUGFIX: Cannot buy augmentations via UI when money is equal to cost (#2039)
This commit is contained in:
@@ -240,7 +240,7 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
|
||||
{props.owned || (
|
||||
<Box sx={{ display: "grid", alignItems: "center", gridTemplateColumns: "1fr 1fr" }}>
|
||||
<Requirement
|
||||
fulfilled={cost === 0 || Player.money > cost}
|
||||
fulfilled={cost === 0 || Player.money >= cost}
|
||||
value={formatMoney(cost)}
|
||||
color={Settings.theme.money}
|
||||
incompleteColor={Settings.theme.error}
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -43,7 +43,7 @@ export function SleeveAugmentationsModal(props: IProps): React.ReactElement {
|
||||
augNames={availableAugs.map((aug) => aug.name)}
|
||||
ownedAugNames={ownedAugNames}
|
||||
canPurchase={(aug) => {
|
||||
return Player.money > aug.baseCost;
|
||||
return Player.money >= aug.baseCost;
|
||||
}}
|
||||
purchaseAugmentation={(aug) => {
|
||||
props.sleeve.tryBuyAugmentation(aug);
|
||||
|
||||
Reference in New Issue
Block a user