From d955280f90426bdf24eb69e557c08a98a98ab34d Mon Sep 17 00:00:00 2001 From: danielyxie Date: Tue, 30 Apr 2019 02:27:13 -0700 Subject: [PATCH] Re-sleeves can no longer have the Neuroflux Governor aug. This is to prevent bugs --- src/Constants.ts | 3 +++ src/PersonObjects/Resleeving/Resleeving.ts | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Constants.ts b/src/Constants.ts index 72e006bb4..e6b60358e 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -284,6 +284,9 @@ export let CONSTANTS: IMap = { ** Added getStockAskPrice(), getStockBidPrice() Netscript functions to the TIX API ** Added getStockPurchaseCost(), getStockSaleGain() Netscript functions to the TIX API + * Re-sleeves can no longer have the NeuroFlux Governor augmentation + ** This is just a temporary patch until the mechanic gets re-worked + * Bug Fix: Fixed sleeve.getInformation() throwing error in certain scenarios * Bug Fix: Coding contracts should no longer generate on the w0r1d_d43m0n server * Bug Fix: Duplicate Sleeves now properly have access to all Augmentations if you have a gang diff --git a/src/PersonObjects/Resleeving/Resleeving.ts b/src/PersonObjects/Resleeving/Resleeving.ts index 518ea3279..9b158145c 100644 --- a/src/PersonObjects/Resleeving/Resleeving.ts +++ b/src/PersonObjects/Resleeving/Resleeving.ts @@ -101,9 +101,12 @@ export function generateResleeves(): Resleeve[] { // Get a random aug const randIndex: number = getRandomInt(0, augKeys.length - 1) const randKey: string = augKeys[randIndex]; - if (randKey === AugmentationNames.TheRedPill) { - continue; // A sleeve can't have The Red Pill + + // Forbidden augmentations + if (randKey === AugmentationNames.TheRedPill || randKey === AugmentationNames.NeuroFluxGovernor) { + continue; } + const randAug: Augmentation | null = Augmentations[randKey]; r.augmentations.push({name: randAug!.name, level: 1}); r.applyAugmentation(Augmentations[randKey]);