mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-14 19:53:48 +01:00
Merge pull request #3275 from danielyxie/dev
Re-add TRP in gang and make .singularity a namespace.
This commit is contained in:
commit
78c1af79e8
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) {
|
if (isPlayersGang) {
|
||||||
let augs = Object.values(Augmentations);
|
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.
|
// Remove special augs.
|
||||||
augs = augs.filter((a) => !a.isSpecial);
|
augs = augs.filter((a) => !a.isSpecial);
|
||||||
|
|
||||||
// Remove faction-unique augs outside BN2. (But keep the one for this faction.)
|
|
||||||
if (player.bitNodeN !== 2) {
|
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));
|
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);
|
return augs.map((a) => a.name);
|
||||||
|
@ -486,6 +486,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
|||||||
const base: INS = {
|
const base: INS = {
|
||||||
...singularity,
|
...singularity,
|
||||||
|
|
||||||
|
singularity: singularity,
|
||||||
gang: gang,
|
gang: gang,
|
||||||
bladeburner: bladeburner,
|
bladeburner: bladeburner,
|
||||||
codingcontract: codingcontract,
|
codingcontract: codingcontract,
|
||||||
|
@ -115,16 +115,16 @@ export function NetscriptSingularity(
|
|||||||
if (player.hasGangWith(facname)) {
|
if (player.hasGangWith(facname)) {
|
||||||
let augs = Object.values(Augmentations);
|
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.
|
// Remove special augs.
|
||||||
augs = augs.filter((a) => !a.isSpecial);
|
augs = augs.filter((a) => !a.isSpecial);
|
||||||
|
|
||||||
// Remove faction-unique augs outside BN2. (But keep the one for this faction.)
|
|
||||||
if (player.bitNodeN !== 2) {
|
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));
|
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);
|
return augs.map((a) => a.name);
|
||||||
|
6
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
6
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -4324,6 +4324,12 @@ export interface NS extends Singularity {
|
|||||||
*/
|
*/
|
||||||
readonly ui: UserInterface;
|
readonly ui: UserInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Namespace for singularity functions.
|
||||||
|
* RAM cost: 0 GB
|
||||||
|
*/
|
||||||
|
readonly singularity: Singularity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Namespace for grafting functions.
|
* Namespace for grafting functions.
|
||||||
* @remarks
|
* @remarks
|
||||||
|
Loading…
Reference in New Issue
Block a user