bitburner-official / bitburner-src

Bitburner source code.
Other
688 stars 232 forks source link

`getAugmentationFactions("NeuroFlux Governor")` includes the gang faction #1413

Closed ilkecan closed 2 weeks ago

ilkecan commented 2 weeks ago

After the player creates a gang, ns.singularity.getAugmentationFactions("NeuroFlux Governor") still lists the gang faction even though it can't be bought from gangs.

Note that the problem is only with getAugmentationFactions and ns.singularity.getAugmentationsFromFaction(ns.gang.getGangInformation().faction) doesn't lists "NeuroFlux Governor" as expected.

if (!ns.gang.inGang()) {
    ns.tprint("You are not in any gang!");
    ns.exit();
}
const gang = ns.gang.getGangInformation().faction;
ns.tprint(`Gang is ${gang}.`);
const aug = "NeuroFlux Governor";
const factions = ns.singularity.getAugmentationFactions(aug);
if (factions.includes(gang)) {
    ns.tprint(`Gang sells ${aug}.`);
    ns.exit();
}

prints:

Gang is Slum Snakes.
Gang sells NeuroFlux Governor.

version

v2.6.1 (e8a825829)