Implement new aug filtering for gangs

This commit is contained in:
nickofolas 2022-03-19 08:43:30 -05:00
parent 5918e12f01
commit 06425d6d63
2 changed files with 14 additions and 6 deletions

@ -45,12 +45,16 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
if (isPlayersGang) {
const augs: string[] = [];
for (const augName of Object.keys(Augmentations)) {
if (augName === AugmentationNames.NeuroFluxGovernor) continue;
if (augName === AugmentationNames.TheRedPill && player.bitNodeN !== 2) continue;
const aug = Augmentations[augName];
if (!aug.isSpecial) {
augs.push(augName);
}
if (
augName === AugmentationNames.NeuroFluxGovernor ||
augName === AugmentationNames.TheRedPill && player.bitNodeN !== 2 ||
// Special augs (i.e. Bladeburner augs)
aug.isSpecial ||
// Exclusive augs (i.e. QLink)
(aug.factions.length <= 1 && !props.faction.augmentations.includes(augName))
) continue;
augs.push(augName);
}
return augs;

@ -64,10 +64,14 @@ export function FactionsRoot(props: IProps): React.ReactElement {
if (isPlayersGang) {
for (const augName of Object.keys(Augmentations)) {
const aug = Augmentations[augName];
if (
augName === AugmentationNames.NeuroFluxGovernor ||
augName === AugmentationNames.TheRedPill && player.bitNodeN !== 2 ||
Augmentations[augName].isSpecial
// Special augs (i.e. Bladeburner augs)
aug.isSpecial ||
// Exclusive augs (i.e. QLink)
(aug.factions.length <= 1 && !faction.augmentations.includes(augName))
) continue;
augs.push(augName)
}