From e8d4265c963fdf77f348e55088c01fdb06249aed Mon Sep 17 00:00:00 2001 From: Russell Stringer Date: Fri, 7 Jan 2022 17:02:44 -0500 Subject: [PATCH] Fix #2446 - ns.purchaseAugment() can no longer buy NF from gang Added the checks from AugmentationPage.tsx to the singularity purchaseAugment() function to disallow buying NF from player-run gang and disallow TRP from player-run gang outside BN2 --- src/NetscriptFunctions/Singularity.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index aa54ee293..f2e2e0542 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -166,6 +166,8 @@ export function NetscriptSingularity( let augs = []; if (player.hasGangWith(faction)) { for (const augName in Augmentations) { + if (augName === AugmentationNames.NeuroFluxGovernor) continue; + if (augName === AugmentationNames.TheRedPill && player.bitNodeN !== 2) continue; const tempAug = Augmentations[augName]; if (!tempAug.isSpecial) { augs.push(augName);