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
This commit is contained in:
Russell Stringer 2022-01-07 17:02:44 -05:00
parent 79b3bb0f0e
commit e8d4265c96

@ -166,6 +166,8 @@ export function NetscriptSingularity(
let augs = []; let augs = [];
if (player.hasGangWith(faction)) { if (player.hasGangWith(faction)) {
for (const augName in Augmentations) { for (const augName in Augmentations) {
if (augName === AugmentationNames.NeuroFluxGovernor) continue;
if (augName === AugmentationNames.TheRedPill && player.bitNodeN !== 2) continue;
const tempAug = Augmentations[augName]; const tempAug = Augmentations[augName];
if (!tempAug.isSpecial) { if (!tempAug.isSpecial) {
augs.push(augName); augs.push(augName);