From d6ac7f44c2a02e447871e3849c514d0a55177c1a Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 16 Mar 2022 15:09:31 -0400 Subject: [PATCH] Sleeves can no longer buy augs that can't help them. --- src/PersonObjects/Sleeve/SleeveHelpers.ts | 27 ++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/PersonObjects/Sleeve/SleeveHelpers.ts b/src/PersonObjects/Sleeve/SleeveHelpers.ts index 923692f2b..0c9787ce3 100644 --- a/src/PersonObjects/Sleeve/SleeveHelpers.ts +++ b/src/PersonObjects/Sleeve/SleeveHelpers.ts @@ -34,7 +34,32 @@ export function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentat return false; } - return true; + const validMults = [ + "hacking_mult", + "strength_mult", + "defense_mult", + "dexterity_mult", + "agility_mult", + "charisma_mult", + "hacking_exp_mult", + "strength_exp_mult", + "defense_exp_mult", + "dexterity_exp_mult", + "agility_exp_mult", + "charisma_exp_mult", + "company_rep_mult", + "faction_rep_mult", + "crime_money_mult", + "crime_success_mult", + "work_money_mult", + ]; + for (const mult of Object.keys(aug.mults)) { + if (validMults.includes(mult)) { + return true; + } + } + + return false; } // If player is in a gang, then we return all augs that the player