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
RAM cost: 0 GB
RAM cost: 0.5 GB
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
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.

View File

@@ -54,7 +54,7 @@ Level of the upgrade.
## 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).

View File

@@ -19,7 +19,7 @@ An array containing the available upgrades
## 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).

View File

@@ -72,7 +72,7 @@ Cost of upgrading the specified Hacknet Node.
## Remarks
RAM cost: 0 GB
RAM cost: 0.5 GB
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
RAM cost: 0 GB
RAM cost: 0.5 GB
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
RAM cost: 0 GB
RAM cost: 0.5 GB
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
RAM cost: 0 GB
RAM cost: 0.5 GB
Returns the cost of upgrading the RAM of the specified Hacknet Node n times.

View File

@@ -19,7 +19,7 @@ Multiplier.
## 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).

View File

@@ -19,7 +19,7 @@ Multiplier.
## 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).

View File

@@ -19,7 +19,7 @@ Number of hashes you can store.
## 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).

View File

@@ -72,7 +72,7 @@ Number of hashes required for the specified upgrade.
## 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).

View File

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

View File

@@ -19,7 +19,7 @@ Number of hashes you have.
## 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).

View File

@@ -19,7 +19,7 @@ Number of hacknet nodes.
## Remarks
RAM cost: 0 GB
RAM cost: 0.5 GB
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
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).

View File

@@ -88,7 +88,7 @@ True if the upgrade is successfully purchased, and false otherwise.
## 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).

View File

@@ -72,7 +72,7 @@ True if the Hacknet Nodes cache level is successfully upgraded, false otherwi
## 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).

View File

@@ -72,7 +72,7 @@ True if the Hacknet Nodes cores are successfully purchased, false otherwise.
## Remarks
RAM cost: 0 GB
RAM cost: 0.5 GB
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
RAM cost: 0 GB
RAM cost: 0.5 GB
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
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.

View File

@@ -6,18 +6,14 @@
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:**
```typescript
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
`run example.js 7 text true`

View File

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

View File

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

View File

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

View File

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

View File

@@ -11,8 +11,3 @@ Namespace for darknet functions. Contains spoilers.
```typescript
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.
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
readonly format: Format;
```
## Remarks
RAM cost: 0 GB

View File

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

View File

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

View File

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

View File

@@ -11,8 +11,3 @@ Namespace for [grafting](./bitburner.grafting.md) functions. Contains spoilers.
```typescript
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
readonly hacknet: Hacknet;
```
## Remarks
RAM cost: 4 GB.

View File

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

View File

@@ -69,6 +69,8 @@ Description
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>
<tr><td>

View File

@@ -112,5 +112,5 @@ const server = ns.args[0];
const files = ["hack.js", "weaken.js", "grow.js"];
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
readonly singularity: Singularity;
```
## Remarks
RAM cost: 0 GB

View File

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

View File

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

View File

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

View File

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

View File

@@ -602,6 +602,10 @@ export function canAccessCotMG(this: PlayerObject): boolean {
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 {
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 {
if (Player.sourceFileLvl(15) >= 3) {
if (Player.activeSourceFileLvl(15) >= 3) {
return p.skills.charisma * scalar;
}
return 0;

View File

@@ -310,7 +310,7 @@ export function prestigeSourceFile(isFlume: boolean): void {
}
// 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");
}

View File

@@ -2925,7 +2925,7 @@ export interface Hacknet {
/**
* Get the number of hacknet nodes you own.
* @remarks
* RAM cost: 0 GB
* RAM cost: 0.5 GB
*
* Returns the number of Hacknet Nodes you own.
*
@@ -2936,7 +2936,7 @@ export interface Hacknet {
/**
* Get the maximum number of hacknet nodes.
* @remarks
* RAM cost: 0 GB
* RAM cost: 0.5 GB
*
* @returns Maximum number of hacknet nodes.
*/
@@ -2945,7 +2945,7 @@ export interface Hacknet {
/**
* Purchase a new hacknet node.
* @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
@@ -2961,7 +2961,7 @@ export interface Hacknet {
/**
* Get the price of the next hacknet node.
* @remarks
* RAM cost: 0 GB
* RAM cost: 0.5 GB
*
* Returns the cost of purchasing a new Hacknet Node.
*
@@ -2972,7 +2972,7 @@ export interface Hacknet {
/**
* Get the stats of a hacknet node.
* @remarks
* RAM cost: 0 GB
* RAM cost: 0.5 GB
*
* 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.
* @remarks
* RAM cost: 0 GB
* RAM cost: 0.5 GB
*
* 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.
* @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.
@@ -3026,7 +3026,7 @@ export interface Hacknet {
/**
* Upgrade the core of a hacknet node.
* @remarks
* RAM cost: 0 GB
* RAM cost: 0.5 GB
*
* Tries to purchase n cores for the specified Hacknet Node.
*
@@ -3044,7 +3044,7 @@ export interface Hacknet {
/**
* Upgrade the cache of a hacknet node.
* @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).
*
@@ -3064,7 +3064,7 @@ export interface Hacknet {
/**
* Calculate the cost of upgrading hacknet node levels.
* @remarks
* RAM cost: 0 GB
* RAM cost: 0.5 GB
*
* 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.
* @remarks
* RAM cost: 0 GB
* RAM cost: 0.5 GB
*
* 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.
* @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.
*
@@ -3112,7 +3112,7 @@ export interface Hacknet {
/**
* Calculate the cost of upgrading hacknet node cache.
* @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).
*
@@ -3130,7 +3130,7 @@ export interface Hacknet {
/**
* Get the total number of hashes stored.
* @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).
*
@@ -3143,7 +3143,7 @@ export interface Hacknet {
/**
* Get the maximum number of hashes you can store.
* @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).
*
@@ -3156,7 +3156,7 @@ export interface Hacknet {
/**
* Get the cost of a hash upgrade.
* @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).
*
@@ -3178,7 +3178,7 @@ export interface Hacknet {
/**
* Purchase a hash upgrade.
* @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).
*
@@ -3207,7 +3207,7 @@ export interface Hacknet {
/**
* Get the list of hash upgrades
* @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).
*
@@ -3223,7 +3223,7 @@ export interface Hacknet {
/**
* Get the level of a hash upgrade.
* @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).
*
@@ -3234,7 +3234,7 @@ export interface Hacknet {
/**
* Get the multiplier to study.
* @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).
*
@@ -3245,7 +3245,7 @@ export interface Hacknet {
/**
* Get the multiplier to training.
* @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).
*
@@ -7014,113 +7014,93 @@ interface UserInterface {
export interface NS {
/**
* Namespace for {@link Hacknet | hacknet} functions. Some of this API contains spoilers.
* @remarks RAM cost: 4 GB.
*/
readonly hacknet: Hacknet;
/**
* Namespace for {@link Bladeburner | Bladeburner} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/
readonly bladeburner: Bladeburner;
/**
* Namespace for {@link CodingContract | coding contract} functions.
* @remarks RAM cost: 0 GB
*/
readonly codingcontract: CodingContract;
/**
* Namespace for {@link Cloud | cloud} functions.
* @remarks RAM cost: 0 GB
*/
readonly cloud: Cloud;
/**
* Namespace for darknet functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/
readonly dnet: Darknet;
/**
* Namespace for {@link Format | formatting} functions.
* @remarks RAM cost: 0 GB
*/
readonly format: Format;
/**
* Namespace for {@link Gang | gang} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/
readonly gang: Gang;
/**
* Namespace for {@link Go | Go} functions.
* @remarks RAM cost: 0 GB
*/
readonly go: Go;
/**
* Namespace for {@link Sleeve | sleeve} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/
readonly sleeve: Sleeve;
/**
* Namespace for {@link Stock | stock} functions.
* @remarks RAM cost: 0 GB
*/
readonly stock: Stock;
/**
* Namespace for {@link Formulas | formulas} functions.
* @remarks RAM cost: 0 GB
*/
readonly formulas: Formulas;
/**
* Namespace for {@link Stanek | Stanek} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/
readonly stanek: Stanek;
/**
* Namespace for {@link Infiltration | infiltration} functions.
* @remarks RAM cost: 0 GB
*/
readonly infiltration: Infiltration;
/**
* Namespace for {@link Corporation | corporation} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/
readonly corporation: Corporation;
/**
* Namespace for {@link UserInterface | user interface} functions.
* @remarks RAM cost: 0 GB
*/
readonly ui: UserInterface;
/**
* Namespace for {@link Singularity | singularity} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/
readonly singularity: Singularity;
/**
* Namespace for {@link Grafting | grafting} functions. Contains spoilers.
* @remarks RAM cost: 0 GB
*/
readonly grafting: Grafting;
/**
* Arguments passed into the script.
*
* @remarks
* RAM cost: 0 GB
*
* Arguments passed into a script can be accessed as a normal array by using the `[]` operator
* 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.
@@ -7920,6 +7900,11 @@ export interface NS {
* // arguments to the script.
* 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 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.
@@ -8057,7 +8042,11 @@ export interface NS {
* 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 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 { SpecialServers } from "../../Server/data/SpecialServers";
const tabsMaxWidth = 1640;
const searchWidth = 180;
interface IProps {
@@ -101,7 +100,6 @@ export function Tabs({ scripts, currentScript, onTabClick, onTabClose, onTabUpda
<Droppable droppableId="tabs" direction="horizontal">
{(provided, snapshot) => (
<Box
maxWidth={`${tabsMaxWidth}px`}
display="flex"
flexGrow="1"
flexDirection="row"

View File

@@ -130,7 +130,7 @@ export const calculateCompanyWorkStats = (
// If player has SF-11, calculate salary multiplier from favor
const favorMult = isNaN(favor) ? 1 : 1 + favor / 100;
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(
multWorkStats(