mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 11:03:48 +01:00
BUGFIX: Check that the augmentation is available before installing it on a sleeve. (#1320)
This commit is contained in:
parent
53f187fb89
commit
e674a177d6
@ -274,6 +274,9 @@ export class Sleeve extends Person implements SleevePerson {
|
|||||||
// Verify that this sleeve does not already have that augmentation.
|
// Verify that this sleeve does not already have that augmentation.
|
||||||
if (this.hasAugmentation(aug.name)) return false;
|
if (this.hasAugmentation(aug.name)) return false;
|
||||||
|
|
||||||
|
// Verify that the augmentation is available for purchase.
|
||||||
|
if (!this.findPurchasableAugs().includes(aug)) return false;
|
||||||
|
|
||||||
Player.loseMoney(aug.baseCost, "sleeves");
|
Player.loseMoney(aug.baseCost, "sleeves");
|
||||||
this.installAugmentation(aug);
|
this.installAugmentation(aug);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user