Merge pull request #3275 from danielyxie/dev

Re-add TRP in gang and make .singularity a namespace.
This commit is contained in:
hydroflame 2022-03-29 18:03:25 -04:00 committed by GitHub
commit 78c1af79e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 13 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -45,16 +45,16 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
if (isPlayersGang) {
let augs = Object.values(Augmentations);
// Remove blacklisted augs.
const blacklist = [AugmentationNames.NeuroFluxGovernor, AugmentationNames.TheRedPill];
augs = augs.filter((a) => !blacklist.includes(a.name));
// Remove special augs.
augs = augs.filter((a) => !a.isSpecial);
// Remove faction-unique augs outside BN2. (But keep the one for this faction.)
if (player.bitNodeN !== 2) {
// Remove faction-unique augs outside BN2. (But keep the one for this faction.)
augs = augs.filter((a) => a.factions.length > 1 || props.faction.augmentations.includes(a.name));
// Remove blacklisted augs.
const blacklist = [AugmentationNames.NeuroFluxGovernor, AugmentationNames.TheRedPill];
augs = augs.filter((a) => !blacklist.includes(a.name));
}
return augs.map((a) => a.name);

@ -486,6 +486,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
const base: INS = {
...singularity,
singularity: singularity,
gang: gang,
bladeburner: bladeburner,
codingcontract: codingcontract,

@ -115,16 +115,16 @@ export function NetscriptSingularity(
if (player.hasGangWith(facname)) {
let augs = Object.values(Augmentations);
// Remove blacklisted augs.
const blacklist = [AugmentationNames.NeuroFluxGovernor, AugmentationNames.TheRedPill];
augs = augs.filter((a) => !blacklist.includes(a.name));
// Remove special augs.
augs = augs.filter((a) => !a.isSpecial);
// Remove faction-unique augs outside BN2. (But keep the one for this faction.)
if (player.bitNodeN !== 2) {
// Remove faction-unique augs outside BN2. (But keep the one for this faction.)
augs = augs.filter((a) => a.factions.length > 1 || Factions[facname].augmentations.includes(a.name));
// Remove blacklisted augs.
const blacklist = [AugmentationNames.NeuroFluxGovernor, AugmentationNames.TheRedPill];
augs = augs.filter((a) => !blacklist.includes(a.name));
}
return augs.map((a) => a.name);

@ -4324,6 +4324,12 @@ export interface NS extends Singularity {
*/
readonly ui: UserInterface;
/**
* Namespace for singularity functions.
* RAM cost: 0 GB
*/
readonly singularity: Singularity;
/**
* Namespace for grafting functions.
* @remarks