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
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

View File

@ -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);

View File

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

View File

@ -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);

View File

@ -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