Compare commits

...

4 Commits

48 changed files with 66 additions and 161 deletions

View File

@@ -72,7 +72,7 @@ Cost of upgrading the specified Hacknet Node's cache.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -72,7 +72,7 @@ Cost of upgrading the specified Hacknet Node's number of cores.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Returns the cost of upgrading the number of cores of the specified Hacknet Node by n. Returns the cost of upgrading the number of cores of the specified Hacknet Node by n.

View File

@@ -54,7 +54,7 @@ Level of the upgrade.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -19,7 +19,7 @@ An array containing the available upgrades
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -72,7 +72,7 @@ Cost of upgrading the specified Hacknet Node.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Returns the cost of upgrading the specified Hacknet Node by n levels. Returns the cost of upgrading the specified Hacknet Node by n levels.

View File

@@ -56,7 +56,7 @@ Object containing a variety of stats about the specified Hacknet Node.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Returns an object containing a variety of stats about the specified Hacknet Node. Returns an object containing a variety of stats about the specified Hacknet Node.

View File

@@ -19,7 +19,7 @@ Cost of purchasing a new Hacknet Node.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Returns the cost of purchasing a new Hacknet Node. Returns the cost of purchasing a new Hacknet Node.

View File

@@ -72,7 +72,7 @@ Cost of upgrading the specified Hacknet Node's RAM.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Returns the cost of upgrading the RAM of the specified Hacknet Node n times. Returns the cost of upgrading the RAM of the specified Hacknet Node n times.

View File

@@ -19,7 +19,7 @@ Multiplier.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -19,7 +19,7 @@ Multiplier.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -19,7 +19,7 @@ Number of hashes you can store.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -72,7 +72,7 @@ Number of hashes required for the specified upgrade.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -19,5 +19,5 @@ Maximum number of hacknet nodes.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB

View File

@@ -19,7 +19,7 @@ Number of hashes you have.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -19,7 +19,7 @@ Number of hacknet nodes.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Returns the number of Hacknet Nodes you own. Returns the number of Hacknet Nodes you own.

View File

@@ -19,7 +19,7 @@ The index of the Hacknet Node or if the player cannot afford to purchase a new H
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Purchases a new Hacknet Node. Returns a number with the index of the Hacknet Node. This index is equivalent to the number at the end of the Hacknet Nodes name (e.g. The Hacknet Node named `hacknet-node-4` will have an index of 4). Purchases a new Hacknet Node. Returns a number with the index of the Hacknet Node. This index is equivalent to the number at the end of the Hacknet Nodes name (e.g. The Hacknet Node named `hacknet-node-4` will have an index of 4).

View File

@@ -88,7 +88,7 @@ True if the upgrade is successfully purchased, and false otherwise.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -72,7 +72,7 @@ True if the Hacknet Nodes cache level is successfully upgraded, false otherwi
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).

View File

@@ -72,7 +72,7 @@ True if the Hacknet Nodes cores are successfully purchased, false otherwise.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Tries to purchase n cores for the specified Hacknet Node. Tries to purchase n cores for the specified Hacknet Node.

View File

@@ -72,7 +72,7 @@ True if the Hacknet Nodes level is successfully upgraded, false otherwise.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Tries to upgrade the level of the specified Hacknet Node by n. Tries to upgrade the level of the specified Hacknet Node by n.

View File

@@ -72,7 +72,7 @@ True if the Hacknet Nodes RAM is successfully upgraded, false otherwise.
## Remarks ## Remarks
RAM cost: 0 GB RAM cost: 0.5 GB
Tries to upgrade the specified Hacknet Nodes RAM n times. Note that each upgrade doubles the Nodes RAM. So this is equivalent to multiplying the Nodes RAM by 2 n. Tries to upgrade the specified Hacknet Nodes RAM n times. Note that each upgrade doubles the Nodes RAM. So this is equivalent to multiplying the Nodes RAM by 2 n.

View File

@@ -6,18 +6,14 @@
Arguments passed into the script. Arguments passed into the script.
These arguments can be accessed as a normal array by using the `[]` operator (`args[0]`<!-- -->, `args[1]`<!-- -->, etc...). Arguments can be string, number, or boolean. Use `args.length` to get the number of arguments that were passed into a script.
**Signature:** **Signature:**
```typescript ```typescript
readonly args: ScriptArg[]; readonly args: ScriptArg[];
``` ```
## Remarks
RAM cost: 0 GB
Arguments passed into a script can be accessed as a normal array by using the `[]` operator (`args[0]`<!-- -->, `args[1]`<!-- -->, etc...). Arguments can be string, number, or boolean. Use `args.length` to get the number of arguments that were passed into a script.
## Example ## Example
`run example.js 7 text true` `run example.js 7 text true`

View File

@@ -11,8 +11,3 @@ Namespace for [Bladeburner](./bitburner.bladeburner.md) functions. Contains spoi
```typescript ```typescript
readonly bladeburner: Bladeburner; readonly bladeburner: Bladeburner;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [cloud](./bitburner.cloud.md) functions.
```typescript ```typescript
readonly cloud: Cloud; readonly cloud: Cloud;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [coding contract](./bitburner.codingcontract.md) functions.
```typescript ```typescript
readonly codingcontract: CodingContract; readonly codingcontract: CodingContract;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [corporation](./bitburner.corporation.md) functions. Contains spoi
```typescript ```typescript
readonly corporation: Corporation; readonly corporation: Corporation;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for darknet functions. Contains spoilers.
```typescript ```typescript
readonly dnet: Darknet; readonly dnet: Darknet;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -132,4 +132,5 @@ ns.exec("generic-hack.js", "joesguns", {threads: 10});
// arguments to the script. // arguments to the script.
ns.exec("foo.js", "foodnstuff", 5, 1, "test"); ns.exec("foo.js", "foodnstuff", 5, 1, "test");
``` ```
For darknet servers: A session must be established with the target server, and the script must be running on a server that is directly connected to the target, or the target must have a backdoor or stasis link installed.

View File

@@ -11,8 +11,3 @@ Namespace for [formatting](./bitburner.format.md) functions.
```typescript ```typescript
readonly format: Format; readonly format: Format;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [formulas](./bitburner.formulas.md) functions.
```typescript ```typescript
readonly formulas: Formulas; readonly formulas: Formulas;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [gang](./bitburner.gang.md) functions. Contains spoilers.
```typescript ```typescript
readonly gang: Gang; readonly gang: Gang;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [Go](./bitburner.go.md) functions.
```typescript ```typescript
readonly go: Go; readonly go: Go;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [grafting](./bitburner.grafting.md) functions. Contains spoilers.
```typescript ```typescript
readonly grafting: Grafting; readonly grafting: Grafting;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [hacknet](./bitburner.hacknet.md) functions. Some of this API cont
```typescript ```typescript
readonly hacknet: Hacknet; readonly hacknet: Hacknet;
``` ```
## Remarks
RAM cost: 4 GB.

View File

@@ -11,8 +11,3 @@ Namespace for [infiltration](./bitburner.infiltration.md) functions.
```typescript ```typescript
readonly infiltration: Infiltration; readonly infiltration: Infiltration;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -69,6 +69,8 @@ Description
Arguments passed into the script. Arguments passed into the script.
These arguments can be accessed as a normal array by using the `[]` operator (`args[0]`<!-- -->, `args[1]`<!-- -->, etc...). Arguments can be string, number, or boolean. Use `args.length` to get the number of arguments that were passed into a script.
</td></tr> </td></tr>
<tr><td> <tr><td>

View File

@@ -112,5 +112,5 @@ const server = ns.args[0];
const files = ["hack.js", "weaken.js", "grow.js"]; const files = ["hack.js", "weaken.js", "grow.js"];
ns.scp(files, server, "home"); ns.scp(files, server, "home");
``` ```
For password-protected servers (such as darknet servers), a session must be established with the destination server before using this function. (The source server does not require a session.) For darknet servers: The destination requires a session, but unlike [exec](./bitburner.ns.exec.md)<!-- -->, does not require a direct connection — scp works at any distance. The source server has no darknet requirements (no session or connection needed). Use [dnet.authenticate](./bitburner.darknet.authenticate.md) (requires direct connection) or [dnet.connectToSession](./bitburner.darknet.connecttosession.md) (at any distance) to establish a session.

View File

@@ -11,8 +11,3 @@ Namespace for [singularity](./bitburner.singularity.md) functions. Contains spoi
```typescript ```typescript
readonly singularity: Singularity; readonly singularity: Singularity;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [sleeve](./bitburner.sleeve.md) functions. Contains spoilers.
```typescript ```typescript
readonly sleeve: Sleeve; readonly sleeve: Sleeve;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [Stanek](./bitburner.stanek.md) functions. Contains spoilers.
```typescript ```typescript
readonly stanek: Stanek; readonly stanek: Stanek;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [stock](./bitburner.stock.md) functions.
```typescript ```typescript
readonly stock: Stock; readonly stock: Stock;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -11,8 +11,3 @@ Namespace for [user interface](./bitburner.userinterface.md) functions.
```typescript ```typescript
readonly ui: UserInterface; readonly ui: UserInterface;
``` ```
## Remarks
RAM cost: 0 GB

View File

@@ -602,6 +602,10 @@ export function canAccessCotMG(this: PlayerObject): boolean {
return canAccessBitNodeFeature(13); return canAccessBitNodeFeature(13);
} }
/**
* To ensure the "SF override" option work properly, this function should only be used in special cases. In most cases,
* activeSourceFileLvl should be used instead.
*/
export function sourceFileLvl(this: PlayerObject, n: number): number { export function sourceFileLvl(this: PlayerObject, n: number): number {
return this.sourceFiles.get(n) ?? 0; return this.sourceFiles.get(n) ?? 0;
} }

View File

@@ -52,7 +52,7 @@ export function getFactionFieldWorkRepGain(p: IPerson, favor: number): number {
} }
function getDarknetCharismaBonus(p: IPerson, scalar: number = 1): number { function getDarknetCharismaBonus(p: IPerson, scalar: number = 1): number {
if (Player.sourceFileLvl(15) >= 3) { if (Player.activeSourceFileLvl(15) >= 3) {
return p.skills.charisma * scalar; return p.skills.charisma * scalar;
} }
return 0; return 0;

View File

@@ -310,7 +310,7 @@ export function prestigeSourceFile(isFlume: boolean): void {
} }
// BitNode 12: The Recursion // BitNode 12: The Recursion
if (Player.bitNodeN === 12 && Player.activeSourceFileLvl(12) > 100) { if (Player.bitNodeN === 12 && Player.sourceFileLvl(12) > 100) {
delayedDialog("Saynt_Garmo is watching you"); delayedDialog("Saynt_Garmo is watching you");
} }

View File

@@ -2925,7 +2925,7 @@ export interface Hacknet {
/** /**
* Get the number of hacknet nodes you own. * Get the number of hacknet nodes you own.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Returns the number of Hacknet Nodes you own. * Returns the number of Hacknet Nodes you own.
* *
@@ -2936,7 +2936,7 @@ export interface Hacknet {
/** /**
* Get the maximum number of hacknet nodes. * Get the maximum number of hacknet nodes.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* @returns Maximum number of hacknet nodes. * @returns Maximum number of hacknet nodes.
*/ */
@@ -2945,7 +2945,7 @@ export interface Hacknet {
/** /**
* Purchase a new hacknet node. * Purchase a new hacknet node.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Purchases a new Hacknet Node. Returns a number with the index of the * Purchases a new Hacknet Node. Returns a number with the index of the
* Hacknet Node. This index is equivalent to the number at the end of * Hacknet Node. This index is equivalent to the number at the end of
@@ -2961,7 +2961,7 @@ export interface Hacknet {
/** /**
* Get the price of the next hacknet node. * Get the price of the next hacknet node.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Returns the cost of purchasing a new Hacknet Node. * Returns the cost of purchasing a new Hacknet Node.
* *
@@ -2972,7 +2972,7 @@ export interface Hacknet {
/** /**
* Get the stats of a hacknet node. * Get the stats of a hacknet node.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Returns an object containing a variety of stats about the specified Hacknet Node. * Returns an object containing a variety of stats about the specified Hacknet Node.
* *
@@ -2988,7 +2988,7 @@ export interface Hacknet {
/** /**
* Upgrade the level of a hacknet node. * Upgrade the level of a hacknet node.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Tries to upgrade the level of the specified Hacknet Node by n. * Tries to upgrade the level of the specified Hacknet Node by n.
* *
@@ -3006,7 +3006,7 @@ export interface Hacknet {
/** /**
* Upgrade the RAM of a hacknet node. * Upgrade the RAM of a hacknet node.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Tries to upgrade the specified Hacknet Nodes RAM n times. * Tries to upgrade the specified Hacknet Nodes RAM n times.
* Note that each upgrade doubles the Nodes RAM. * Note that each upgrade doubles the Nodes RAM.
@@ -3026,7 +3026,7 @@ export interface Hacknet {
/** /**
* Upgrade the core of a hacknet node. * Upgrade the core of a hacknet node.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Tries to purchase n cores for the specified Hacknet Node. * Tries to purchase n cores for the specified Hacknet Node.
* *
@@ -3044,7 +3044,7 @@ export interface Hacknet {
/** /**
* Upgrade the cache of a hacknet node. * Upgrade the cache of a hacknet node.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3064,7 +3064,7 @@ export interface Hacknet {
/** /**
* Calculate the cost of upgrading hacknet node levels. * Calculate the cost of upgrading hacknet node levels.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Returns the cost of upgrading the specified Hacknet Node by n levels. * Returns the cost of upgrading the specified Hacknet Node by n levels.
* *
@@ -3080,7 +3080,7 @@ export interface Hacknet {
/** /**
* Calculate the cost of upgrading hacknet node RAM. * Calculate the cost of upgrading hacknet node RAM.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Returns the cost of upgrading the RAM of the specified Hacknet Node n times. * Returns the cost of upgrading the RAM of the specified Hacknet Node n times.
* *
@@ -3096,7 +3096,7 @@ export interface Hacknet {
/** /**
* Calculate the cost of upgrading hacknet node cores. * Calculate the cost of upgrading hacknet node cores.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* Returns the cost of upgrading the number of cores of the specified Hacknet Node by n. * Returns the cost of upgrading the number of cores of the specified Hacknet Node by n.
* *
@@ -3112,7 +3112,7 @@ export interface Hacknet {
/** /**
* Calculate the cost of upgrading hacknet node cache. * Calculate the cost of upgrading hacknet node cache.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3130,7 +3130,7 @@ export interface Hacknet {
/** /**
* Get the total number of hashes stored. * Get the total number of hashes stored.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3143,7 +3143,7 @@ export interface Hacknet {
/** /**
* Get the maximum number of hashes you can store. * Get the maximum number of hashes you can store.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3156,7 +3156,7 @@ export interface Hacknet {
/** /**
* Get the cost of a hash upgrade. * Get the cost of a hash upgrade.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3178,7 +3178,7 @@ export interface Hacknet {
/** /**
* Purchase a hash upgrade. * Purchase a hash upgrade.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3207,7 +3207,7 @@ export interface Hacknet {
/** /**
* Get the list of hash upgrades * Get the list of hash upgrades
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3223,7 +3223,7 @@ export interface Hacknet {
/** /**
* Get the level of a hash upgrade. * Get the level of a hash upgrade.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3234,7 +3234,7 @@ export interface Hacknet {
/** /**
* Get the multiplier to study. * Get the multiplier to study.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -3245,7 +3245,7 @@ export interface Hacknet {
/** /**
* Get the multiplier to training. * Get the multiplier to training.
* @remarks * @remarks
* RAM cost: 0 GB * RAM cost: 0.5 GB
* *
* This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node). * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
* *
@@ -7014,113 +7014,93 @@ interface UserInterface {
export interface NS { export interface NS {
/** /**
* Namespace for {@link Hacknet | hacknet} functions. Some of this API contains spoilers. * Namespace for {@link Hacknet | hacknet} functions. Some of this API contains spoilers.
* @remarks RAM cost: 4 GB.
*/ */
readonly hacknet: Hacknet; readonly hacknet: Hacknet;
/** /**
* Namespace for {@link Bladeburner | Bladeburner} functions. Contains spoilers. * Namespace for {@link Bladeburner | Bladeburner} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/ */
readonly bladeburner: Bladeburner; readonly bladeburner: Bladeburner;
/** /**
* Namespace for {@link CodingContract | coding contract} functions. * Namespace for {@link CodingContract | coding contract} functions.
* @remarks RAM cost: 0 GB
*/ */
readonly codingcontract: CodingContract; readonly codingcontract: CodingContract;
/** /**
* Namespace for {@link Cloud | cloud} functions. * Namespace for {@link Cloud | cloud} functions.
* @remarks RAM cost: 0 GB
*/ */
readonly cloud: Cloud; readonly cloud: Cloud;
/** /**
* Namespace for darknet functions. Contains spoilers. * Namespace for darknet functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/ */
readonly dnet: Darknet; readonly dnet: Darknet;
/** /**
* Namespace for {@link Format | formatting} functions. * Namespace for {@link Format | formatting} functions.
* @remarks RAM cost: 0 GB
*/ */
readonly format: Format; readonly format: Format;
/** /**
* Namespace for {@link Gang | gang} functions. Contains spoilers. * Namespace for {@link Gang | gang} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/ */
readonly gang: Gang; readonly gang: Gang;
/** /**
* Namespace for {@link Go | Go} functions. * Namespace for {@link Go | Go} functions.
* @remarks RAM cost: 0 GB
*/ */
readonly go: Go; readonly go: Go;
/** /**
* Namespace for {@link Sleeve | sleeve} functions. Contains spoilers. * Namespace for {@link Sleeve | sleeve} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/ */
readonly sleeve: Sleeve; readonly sleeve: Sleeve;
/** /**
* Namespace for {@link Stock | stock} functions. * Namespace for {@link Stock | stock} functions.
* @remarks RAM cost: 0 GB
*/ */
readonly stock: Stock; readonly stock: Stock;
/** /**
* Namespace for {@link Formulas | formulas} functions. * Namespace for {@link Formulas | formulas} functions.
* @remarks RAM cost: 0 GB
*/ */
readonly formulas: Formulas; readonly formulas: Formulas;
/** /**
* Namespace for {@link Stanek | Stanek} functions. Contains spoilers. * Namespace for {@link Stanek | Stanek} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/ */
readonly stanek: Stanek; readonly stanek: Stanek;
/** /**
* Namespace for {@link Infiltration | infiltration} functions. * Namespace for {@link Infiltration | infiltration} functions.
* @remarks RAM cost: 0 GB
*/ */
readonly infiltration: Infiltration; readonly infiltration: Infiltration;
/** /**
* Namespace for {@link Corporation | corporation} functions. Contains spoilers. * Namespace for {@link Corporation | corporation} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/ */
readonly corporation: Corporation; readonly corporation: Corporation;
/** /**
* Namespace for {@link UserInterface | user interface} functions. * Namespace for {@link UserInterface | user interface} functions.
* @remarks RAM cost: 0 GB
*/ */
readonly ui: UserInterface; readonly ui: UserInterface;
/** /**
* Namespace for {@link Singularity | singularity} functions. Contains spoilers. * Namespace for {@link Singularity | singularity} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/ */
readonly singularity: Singularity; readonly singularity: Singularity;
/** /**
* Namespace for {@link Grafting | grafting} functions. Contains spoilers. * Namespace for {@link Grafting | grafting} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/ */
readonly grafting: Grafting; readonly grafting: Grafting;
/** /**
* Arguments passed into the script. * Arguments passed into the script.
* *
* @remarks * These arguments can be accessed as a normal array by using the `[]` operator
* RAM cost: 0 GB
*
* Arguments passed into a script can be accessed as a normal array by using the `[]` operator
* (`args[0]`, `args[1]`, etc...). * (`args[0]`, `args[1]`, etc...).
* Arguments can be string, number, or boolean. * Arguments can be string, number, or boolean.
* Use `args.length` to get the number of arguments that were passed into a script. * Use `args.length` to get the number of arguments that were passed into a script.
@@ -7920,6 +7900,11 @@ export interface NS {
* // arguments to the script. * // arguments to the script.
* ns.exec("foo.js", "foodnstuff", 5, 1, "test"); * ns.exec("foo.js", "foodnstuff", 5, 1, "test");
* ``` * ```
*
* For darknet servers: A session must be established with the target server, and the script must be
* running on a server that is directly connected to the target, or the target must have a backdoor or
* stasis link installed.
*
* @param script - Filename of script to execute. This file must already exist on the target server. * @param script - Filename of script to execute. This file must already exist on the target server.
* @param host - Hostname/IP of the target server on which to execute the script. * @param host - Hostname/IP of the target server on which to execute the script.
* @param threadOrOptions - Either an integer number of threads for new script, or a {@link RunOptions} object. Threads defaults to 1. * @param threadOrOptions - Either an integer number of threads for new script, or a {@link RunOptions} object. Threads defaults to 1.
@@ -8057,7 +8042,11 @@ export interface NS {
* ns.scp(files, server, "home"); * ns.scp(files, server, "home");
* ``` * ```
* *
* For password-protected servers (such as darknet servers), a session must be established with the destination server before using this function. (The source server does not require a session.) * For darknet servers: The destination requires a session, but unlike {@link NS.exec | exec}, does not
* require a direct connection — scp works at any distance. The source server has no darknet requirements
* (no session or connection needed). Use {@link Darknet.authenticate | dnet.authenticate} (requires direct
* connection) or {@link Darknet.connectToSession | dnet.connectToSession} (at any distance) to
* establish a session.
* *
* @param files - Filename or an array of filenames of script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`. * @param files - Filename or an array of filenames of script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`.
* @param destination - Hostname/IP of the destination server, which is the server to which the file will be copied. * @param destination - Hostname/IP of the destination server, which is the server to which the file will be copied.

View File

@@ -18,7 +18,6 @@ import { OpenScript } from "./OpenScript";
import { Tab } from "./Tab"; import { Tab } from "./Tab";
import { SpecialServers } from "../../Server/data/SpecialServers"; import { SpecialServers } from "../../Server/data/SpecialServers";
const tabsMaxWidth = 1640;
const searchWidth = 180; const searchWidth = 180;
interface IProps { interface IProps {
@@ -101,7 +100,6 @@ export function Tabs({ scripts, currentScript, onTabClick, onTabClose, onTabUpda
<Droppable droppableId="tabs" direction="horizontal"> <Droppable droppableId="tabs" direction="horizontal">
{(provided, snapshot) => ( {(provided, snapshot) => (
<Box <Box
maxWidth={`${tabsMaxWidth}px`}
display="flex" display="flex"
flexGrow="1" flexGrow="1"
flexDirection="row" flexDirection="row"

View File

@@ -130,7 +130,7 @@ export const calculateCompanyWorkStats = (
// If player has SF-11, calculate salary multiplier from favor // If player has SF-11, calculate salary multiplier from favor
const favorMult = isNaN(favor) ? 1 : 1 + favor / 100; const favorMult = isNaN(favor) ? 1 : 1 + favor / 100;
const bn11Mult = Player.activeSourceFileLvl(11) > 0 ? favorMult : 1; const bn11Mult = Player.activeSourceFileLvl(11) > 0 ? favorMult : 1;
const sf15Mult = Player.sourceFileLvl(15) > 1 ? getMultiplierFromCharisma(1.5) : 1; const sf15Mult = Player.activeSourceFileLvl(15) > 1 ? getMultiplierFromCharisma(1.5) : 1;
const gains = scaleWorkStats( const gains = scaleWorkStats(
multWorkStats( multWorkStats(