mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 01:53:48 +01:00
commit
d6cbca94bd
28
dist/bitburner.d.ts
vendored
28
dist/bitburner.d.ts
vendored
@ -756,7 +756,7 @@ export declare interface CodingContract {
|
|||||||
* @param opts - Optional parameters for configuring function behavior.
|
* @param opts - Optional parameters for configuring function behavior.
|
||||||
* @returns True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.
|
* @returns True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.
|
||||||
*/
|
*/
|
||||||
attempt(answer: string[] | number, fn: string, host?: string, opts?: CodingAttemptOptions): boolean | string;
|
attempt(answer: string[] | number, filename: string, host?: string, opts?: CodingAttemptOptions): boolean | string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the type of a coding contract.
|
* Get the type of a coding contract.
|
||||||
@ -770,7 +770,7 @@ export declare interface CodingContract {
|
|||||||
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
||||||
* @returns Name describing the type of problem posed by the Coding Contract.
|
* @returns Name describing the type of problem posed by the Coding Contract.
|
||||||
*/
|
*/
|
||||||
getContractType(fn: string, host?: string): string;
|
getContractType(filename: string, host?: string): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the description.
|
* Get the description.
|
||||||
@ -783,7 +783,7 @@ export declare interface CodingContract {
|
|||||||
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
||||||
* @returns Contract’s text description.
|
* @returns Contract’s text description.
|
||||||
*/
|
*/
|
||||||
getDescription(fn: string, host?: string): string;
|
getDescription(filename: string, host?: string): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the input data.
|
* Get the input data.
|
||||||
@ -794,11 +794,11 @@ export declare interface CodingContract {
|
|||||||
* Note that this is not the same as the contract’s description.
|
* Note that this is not the same as the contract’s description.
|
||||||
* This is just the data that the contract wants you to act on in order to solve
|
* This is just the data that the contract wants you to act on in order to solve
|
||||||
*
|
*
|
||||||
* @param fn - Filename of the contract.
|
* @param filename - Filename of the contract.
|
||||||
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
||||||
* @returns The specified contract’s data;
|
* @returns The specified contract’s data;
|
||||||
*/
|
*/
|
||||||
getData(fn: string, host?: string): string;
|
getData(filename: string, host?: string): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of attempt remaining.
|
* Get the number of attempt remaining.
|
||||||
@ -811,7 +811,7 @@ export declare interface CodingContract {
|
|||||||
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
||||||
* @returns How many attempts are remaining for the contract;
|
* @returns How many attempts are remaining for the contract;
|
||||||
*/
|
*/
|
||||||
getNumTriesRemaining(fn: string, host?: string): number;
|
getNumTriesRemaining(filename: string, host?: string): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1962,7 +1962,7 @@ export declare interface NS extends Singularity {
|
|||||||
* @param growthAmount - Multiplicative factor by which the server is grown. Decimal form..
|
* @param growthAmount - Multiplicative factor by which the server is grown. Decimal form..
|
||||||
* @returns The amount of grow calls needed to grow the specified server by the specified amount
|
* @returns The amount of grow calls needed to grow the specified server by the specified amount
|
||||||
*/
|
*/
|
||||||
growthAnalyze(host: string, growthAmount: number): number;
|
growthAnalyze(host: string, growthAmount: number, cores?: number): number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the security increase for a number of thread.
|
* Calculate the security increase for a number of thread.
|
||||||
@ -2019,9 +2019,10 @@ export declare interface NS extends Singularity {
|
|||||||
* @remarks
|
* @remarks
|
||||||
* RAM cost: 0 GB
|
* RAM cost: 0 GB
|
||||||
*
|
*
|
||||||
|
* @param format - format of the message
|
||||||
* @param msg - Value to be printed.
|
* @param msg - Value to be printed.
|
||||||
*/
|
*/
|
||||||
tprintf(msg: any): void;
|
tprintf(format: string, ...values: any[]): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the script’s logs.
|
* Clears the script’s logs.
|
||||||
@ -2424,12 +2425,7 @@ export declare interface NS extends Singularity {
|
|||||||
* @param destination - Host of the destination server, which is the server to which the file will be copied.
|
* @param destination - Host of the destination server, which is the server to which the file will be copied.
|
||||||
* @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.
|
* @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.
|
||||||
*/
|
*/
|
||||||
scp(
|
scp(files: string | string[], source: string, destination: string): Promise<boolean>;
|
||||||
files: string[],
|
|
||||||
source: string,
|
|
||||||
// tslint:disable-next-line:unified-signatures
|
|
||||||
destination: string,
|
|
||||||
): Promise<boolean>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List files on a server.
|
* List files on a server.
|
||||||
@ -2775,7 +2771,7 @@ export declare interface NS extends Singularity {
|
|||||||
* RAM cost: 0.3 GB
|
* RAM cost: 0.3 GB
|
||||||
* @returns info about a running script
|
* @returns info about a running script
|
||||||
*/
|
*/
|
||||||
getRunningScript(fn: string | number, hostname: string, ...args: (string | number)[]): RunningScript;
|
getRunningScript(filename: string | number, hostname: string, ...args: (string | number)[]): RunningScript;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get cost of purchasing a server.
|
* Get cost of purchasing a server.
|
||||||
@ -4329,7 +4325,7 @@ export declare interface Singularity {
|
|||||||
*
|
*
|
||||||
* @returns True if the installation was successful.
|
* @returns True if the installation was successful.
|
||||||
*/
|
*/
|
||||||
installBackdoor(): Promise<boolean>;
|
installBackdoor(): Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4689,7 +4689,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": ", fn: "
|
"text": ", filename: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -4741,7 +4741,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"parameterName": "fn",
|
"parameterName": "filename",
|
||||||
"parameterTypeTokenRange": {
|
"parameterTypeTokenRange": {
|
||||||
"startIndex": 3,
|
"startIndex": 3,
|
||||||
"endIndex": 4
|
"endIndex": 4
|
||||||
@ -4771,7 +4771,7 @@
|
|||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "getContractType(fn: "
|
"text": "getContractType(filename: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -4807,7 +4807,7 @@
|
|||||||
"overloadIndex": 1,
|
"overloadIndex": 1,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"parameterName": "fn",
|
"parameterName": "filename",
|
||||||
"parameterTypeTokenRange": {
|
"parameterTypeTokenRange": {
|
||||||
"startIndex": 1,
|
"startIndex": 1,
|
||||||
"endIndex": 2
|
"endIndex": 2
|
||||||
@ -4826,11 +4826,11 @@
|
|||||||
{
|
{
|
||||||
"kind": "MethodSignature",
|
"kind": "MethodSignature",
|
||||||
"canonicalReference": "bitburner!CodingContract#getData:member(1)",
|
"canonicalReference": "bitburner!CodingContract#getData:member(1)",
|
||||||
"docComment": "/**\n * Get the input data.\n *\n * @remarks\n *\n * RAM cost: 5 GB\n *\n * Get the data associated with the specific Coding Contract. Note that this is not the same as the contract’s description. This is just the data that the contract wants you to act on in order to solve\n *\n * @param fn - Filename of the contract.\n *\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n *\n * @returns The specified contract’s data;\n */\n",
|
"docComment": "/**\n * Get the input data.\n *\n * @remarks\n *\n * RAM cost: 5 GB\n *\n * Get the data associated with the specific Coding Contract. Note that this is not the same as the contract’s description. This is just the data that the contract wants you to act on in order to solve\n *\n * @param filename - Filename of the contract.\n *\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n *\n * @returns The specified contract’s data;\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "getData(fn: "
|
"text": "getData(filename: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -4866,7 +4866,7 @@
|
|||||||
"overloadIndex": 1,
|
"overloadIndex": 1,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"parameterName": "fn",
|
"parameterName": "filename",
|
||||||
"parameterTypeTokenRange": {
|
"parameterTypeTokenRange": {
|
||||||
"startIndex": 1,
|
"startIndex": 1,
|
||||||
"endIndex": 2
|
"endIndex": 2
|
||||||
@ -4889,7 +4889,7 @@
|
|||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "getDescription(fn: "
|
"text": "getDescription(filename: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -4925,7 +4925,7 @@
|
|||||||
"overloadIndex": 1,
|
"overloadIndex": 1,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"parameterName": "fn",
|
"parameterName": "filename",
|
||||||
"parameterTypeTokenRange": {
|
"parameterTypeTokenRange": {
|
||||||
"startIndex": 1,
|
"startIndex": 1,
|
||||||
"endIndex": 2
|
"endIndex": 2
|
||||||
@ -4948,7 +4948,7 @@
|
|||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "getNumTriesRemaining(fn: "
|
"text": "getNumTriesRemaining(filename: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -4984,7 +4984,7 @@
|
|||||||
"overloadIndex": 1,
|
"overloadIndex": 1,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"parameterName": "fn",
|
"parameterName": "filename",
|
||||||
"parameterTypeTokenRange": {
|
"parameterTypeTokenRange": {
|
||||||
"startIndex": 1,
|
"startIndex": 1,
|
||||||
"endIndex": 2
|
"endIndex": 2
|
||||||
@ -12899,7 +12899,7 @@
|
|||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "getRunningScript(fn: "
|
"text": "getRunningScript(filename: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -12944,7 +12944,7 @@
|
|||||||
"overloadIndex": 1,
|
"overloadIndex": 1,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"parameterName": "fn",
|
"parameterName": "filename",
|
||||||
"parameterTypeTokenRange": {
|
"parameterTypeTokenRange": {
|
||||||
"startIndex": 1,
|
"startIndex": 1,
|
||||||
"endIndex": 2
|
"endIndex": 2
|
||||||
@ -13963,6 +13963,14 @@
|
|||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "number"
|
"text": "number"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"kind": "Content",
|
||||||
|
"text": ", cores?: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "Content",
|
||||||
|
"text": "number"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "): "
|
"text": "): "
|
||||||
@ -13978,8 +13986,8 @@
|
|||||||
],
|
],
|
||||||
"isOptional": false,
|
"isOptional": false,
|
||||||
"returnTypeTokenRange": {
|
"returnTypeTokenRange": {
|
||||||
"startIndex": 5,
|
"startIndex": 7,
|
||||||
"endIndex": 6
|
"endIndex": 8
|
||||||
},
|
},
|
||||||
"releaseTag": "Public",
|
"releaseTag": "Public",
|
||||||
"overloadIndex": 1,
|
"overloadIndex": 1,
|
||||||
@ -13997,6 +14005,13 @@
|
|||||||
"startIndex": 3,
|
"startIndex": 3,
|
||||||
"endIndex": 4
|
"endIndex": 4
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "cores",
|
||||||
|
"parameterTypeTokenRange": {
|
||||||
|
"startIndex": 5,
|
||||||
|
"endIndex": 6
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "growthAnalyze"
|
"name": "growthAnalyze"
|
||||||
@ -15390,15 +15405,15 @@
|
|||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "scp(\n files: "
|
"text": "scp(files: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "string[]"
|
"text": "string | string[]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": ",\n source: "
|
"text": ", source: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -15406,7 +15421,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": ",\n // tslint:disable-next-line:unified-signatures\n destination: "
|
"text": ", destination: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -15414,7 +15429,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": ",\n ): "
|
"text": "): "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Reference",
|
"kind": "Reference",
|
||||||
@ -16143,15 +16158,23 @@
|
|||||||
{
|
{
|
||||||
"kind": "MethodSignature",
|
"kind": "MethodSignature",
|
||||||
"canonicalReference": "bitburner!NS#tprintf:member(1)",
|
"canonicalReference": "bitburner!NS#tprintf:member(1)",
|
||||||
"docComment": "/**\n * Prints a raw value or a variable to the Terminal.\n *\n * @remarks\n *\n * RAM cost: 0 GB\n *\n * @param msg - Value to be printed.\n */\n",
|
"docComment": "/**\n * Prints a raw value or a variable to the Terminal.\n *\n * @remarks\n *\n * RAM cost: 0 GB\n *\n * @param format - format of the message\n *\n * @param msg - Value to be printed.\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "tprintf(msg: "
|
"text": "tprintf(format: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "any"
|
"text": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "Content",
|
||||||
|
"text": ", ...values: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "Content",
|
||||||
|
"text": "any[]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -16168,18 +16191,25 @@
|
|||||||
],
|
],
|
||||||
"isOptional": false,
|
"isOptional": false,
|
||||||
"returnTypeTokenRange": {
|
"returnTypeTokenRange": {
|
||||||
"startIndex": 3,
|
"startIndex": 5,
|
||||||
"endIndex": 4
|
"endIndex": 6
|
||||||
},
|
},
|
||||||
"releaseTag": "Public",
|
"releaseTag": "Public",
|
||||||
"overloadIndex": 1,
|
"overloadIndex": 1,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"parameterName": "msg",
|
"parameterName": "format",
|
||||||
"parameterTypeTokenRange": {
|
"parameterTypeTokenRange": {
|
||||||
"startIndex": 1,
|
"startIndex": 1,
|
||||||
"endIndex": 2
|
"endIndex": 2
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "values",
|
||||||
|
"parameterTypeTokenRange": {
|
||||||
|
"startIndex": 3,
|
||||||
|
"endIndex": 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "tprintf"
|
"name": "tprintf"
|
||||||
@ -21232,7 +21262,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "<boolean>"
|
"text": "<void>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ Attemps a coding contract.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
attempt(answer: string[] | number, fn: string, host?: string, opts?: CodingAttemptOptions): boolean | string;
|
attempt(answer: string[] | number, filename: string, host?: string, opts?: CodingAttemptOptions): boolean | string;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -17,7 +17,7 @@ attempt(answer: string[] | number, fn: string, host?: string, opts?: CodingAttem
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| answer | string\[\] \| number | Solution for the contract. |
|
| answer | string\[\] \| number | Solution for the contract. |
|
||||||
| fn | string | Filename of the contract. |
|
| filename | string | |
|
||||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||||
| opts | [CodingAttemptOptions](./bitburner.codingattemptoptions.md) | Optional parameters for configuring function behavior. |
|
| opts | [CodingAttemptOptions](./bitburner.codingattemptoptions.md) | Optional parameters for configuring function behavior. |
|
||||||
|
|
||||||
|
@ -9,14 +9,14 @@ Get the type of a coding contract.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getContractType(fn: string, host?: string): string;
|
getContractType(filename: string, host?: string): string;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| fn | string | Filename of the contract. |
|
| filename | string | |
|
||||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
@ -9,14 +9,14 @@ Get the input data.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getData(fn: string, host?: string): string;
|
getData(filename: string, host?: string): string;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| fn | string | Filename of the contract. |
|
| filename | string | Filename of the contract. |
|
||||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
@ -9,14 +9,14 @@ Get the description.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getDescription(fn: string, host?: string): string;
|
getDescription(filename: string, host?: string): string;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| fn | string | Filename of the contract. |
|
| filename | string | |
|
||||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
@ -9,14 +9,14 @@ Get the number of attempt remaining.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getNumTriesRemaining(fn: string, host?: string): number;
|
getNumTriesRemaining(filename: string, host?: string): number;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| fn | string | Filename of the contract. |
|
| filename | string | |
|
||||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
@ -16,9 +16,9 @@ export interface CodingContract
|
|||||||
|
|
||||||
| Method | Description |
|
| Method | Description |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| [attempt(answer, fn, host, opts)](./bitburner.codingcontract.attempt.md) | Attemps a coding contract. |
|
| [attempt(answer, filename, host, opts)](./bitburner.codingcontract.attempt.md) | Attemps a coding contract. |
|
||||||
| [getContractType(fn, host)](./bitburner.codingcontract.getcontracttype.md) | Get the type of a coding contract. |
|
| [getContractType(filename, host)](./bitburner.codingcontract.getcontracttype.md) | Get the type of a coding contract. |
|
||||||
| [getData(fn, host)](./bitburner.codingcontract.getdata.md) | Get the input data. |
|
| [getData(filename, host)](./bitburner.codingcontract.getdata.md) | Get the input data. |
|
||||||
| [getDescription(fn, host)](./bitburner.codingcontract.getdescription.md) | Get the description. |
|
| [getDescription(filename, host)](./bitburner.codingcontract.getdescription.md) | Get the description. |
|
||||||
| [getNumTriesRemaining(fn, host)](./bitburner.codingcontract.getnumtriesremaining.md) | Get the number of attempt remaining. |
|
| [getNumTriesRemaining(filename, host)](./bitburner.codingcontract.getnumtriesremaining.md) | Get the number of attempt remaining. |
|
||||||
|
|
||||||
|
@ -9,14 +9,14 @@ Get general info about a running script.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getRunningScript(fn: string | number, hostname: string, ...args: (string | number)[]): RunningScript;
|
getRunningScript(filename: string | number, hostname: string, ...args: (string | number)[]): RunningScript;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| fn | string \| number | |
|
| filename | string \| number | |
|
||||||
| hostname | string | |
|
| hostname | string | |
|
||||||
| args | (string \| number)\[\] | |
|
| args | (string \| number)\[\] | |
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Calculate the number of grow thread needed to grow a server by a certain multipl
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
growthAnalyze(host: string, growthAmount: number): number;
|
growthAnalyze(host: string, growthAmount: number, cores?: number): number;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -18,6 +18,7 @@ growthAnalyze(host: string, growthAmount: number): number;
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| host | string | Hostname of the target server. |
|
| host | string | Hostname of the target server. |
|
||||||
| growthAmount | number | Multiplicative factor by which the server is grown. Decimal form.. |
|
| growthAmount | number | Multiplicative factor by which the server is grown. Decimal form.. |
|
||||||
|
| cores | number | |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ export interface NS extends Singularity
|
|||||||
| [getPurchasedServerLimit()](./bitburner.ns.getpurchasedserverlimit.md) | Returns the maximum number of servers you can purchase. |
|
| [getPurchasedServerLimit()](./bitburner.ns.getpurchasedserverlimit.md) | Returns the maximum number of servers you can purchase. |
|
||||||
| [getPurchasedServerMaxRam()](./bitburner.ns.getpurchasedservermaxram.md) | Returns the maximum RAM that a purchased server can have. |
|
| [getPurchasedServerMaxRam()](./bitburner.ns.getpurchasedservermaxram.md) | Returns the maximum RAM that a purchased server can have. |
|
||||||
| [getPurchasedServers(hostnameMode)](./bitburner.ns.getpurchasedservers.md) | Returns an array with either the hostnames or IPs of all of the servers you have purchased. |
|
| [getPurchasedServers(hostnameMode)](./bitburner.ns.getpurchasedservers.md) | Returns an array with either the hostnames or IPs of all of the servers you have purchased. |
|
||||||
| [getRunningScript(fn, hostname, args)](./bitburner.ns.getrunningscript.md) | Get general info about a running script. |
|
| [getRunningScript(filename, hostname, args)](./bitburner.ns.getrunningscript.md) | Get general info about a running script. |
|
||||||
| [getScriptExpGain(script, host, args)](./bitburner.ns.getscriptexpgain.md) | Get the exp gain of a script. |
|
| [getScriptExpGain(script, host, args)](./bitburner.ns.getscriptexpgain.md) | Get the exp gain of a script. |
|
||||||
| [getScriptIncome(script, host, args)](./bitburner.ns.getscriptincome.md) | Get the income of a script. |
|
| [getScriptIncome(script, host, args)](./bitburner.ns.getscriptincome.md) | Get the income of a script. |
|
||||||
| [getScriptLogs(fn, host, args)](./bitburner.ns.getscriptlogs.md) | Get all the logs of a script. |
|
| [getScriptLogs(fn, host, args)](./bitburner.ns.getscriptlogs.md) | Get all the logs of a script. |
|
||||||
@ -80,7 +80,7 @@ export interface NS extends Singularity
|
|||||||
| [getTimeSinceLastAug()](./bitburner.ns.gettimesincelastaug.md) | Returns the amount of time in milliseconds that have passed since you last installed Augmentations. |
|
| [getTimeSinceLastAug()](./bitburner.ns.gettimesincelastaug.md) | Returns the amount of time in milliseconds that have passed since you last installed Augmentations. |
|
||||||
| [getWeakenTime(host)](./bitburner.ns.getweakentime.md) | Get the execution time of a weaken() call. |
|
| [getWeakenTime(host)](./bitburner.ns.getweakentime.md) | Get the execution time of a weaken() call. |
|
||||||
| [grow(host, opts)](./bitburner.ns.grow.md) | Spoof money in a servers bank account, increasing the amount available. |
|
| [grow(host, opts)](./bitburner.ns.grow.md) | Spoof money in a servers bank account, increasing the amount available. |
|
||||||
| [growthAnalyze(host, growthAmount)](./bitburner.ns.growthanalyze.md) | Calculate the number of grow thread needed to grow a server by a certain multiplier. |
|
| [growthAnalyze(host, growthAmount, cores)](./bitburner.ns.growthanalyze.md) | Calculate the number of grow thread needed to grow a server by a certain multiplier. |
|
||||||
| [growthAnalyzeSecurity(threads)](./bitburner.ns.growthanalyzesecurity.md) | Calculate the security increase for a number of thread. |
|
| [growthAnalyzeSecurity(threads)](./bitburner.ns.growthanalyzesecurity.md) | Calculate the security increase for a number of thread. |
|
||||||
| [hack(host, opts)](./bitburner.ns.hack.md) | Steal a servers money. |
|
| [hack(host, opts)](./bitburner.ns.hack.md) | Steal a servers money. |
|
||||||
| [hackAnalyze(host)](./bitburner.ns.hackanalyze.md) | Get the percent of money stolen with a single thread. |
|
| [hackAnalyze(host)](./bitburner.ns.hackanalyze.md) | Get the percent of money stolen with a single thread. |
|
||||||
@ -119,7 +119,7 @@ export interface NS extends Singularity
|
|||||||
| [tFormat(milliseconds, milliPrecision)](./bitburner.ns.tformat.md) | Format time to readable string |
|
| [tFormat(milliseconds, milliPrecision)](./bitburner.ns.tformat.md) | Format time to readable string |
|
||||||
| [toast(msg, variant)](./bitburner.ns.toast.md) | Queue a toast (bottom-right notification). |
|
| [toast(msg, variant)](./bitburner.ns.toast.md) | Queue a toast (bottom-right notification). |
|
||||||
| [tprint(msg)](./bitburner.ns.tprint.md) | Prints a value or a variable to the Terminal. |
|
| [tprint(msg)](./bitburner.ns.tprint.md) | Prints a value or a variable to the Terminal. |
|
||||||
| [tprintf(msg)](./bitburner.ns.tprintf.md) | Prints a raw value or a variable to the Terminal. |
|
| [tprintf(format, values)](./bitburner.ns.tprintf.md) | Prints a raw value or a variable to the Terminal. |
|
||||||
| [tryWritePort(port, data)](./bitburner.ns.trywriteport.md) | Attempt to write to a port. |
|
| [tryWritePort(port, data)](./bitburner.ns.trywriteport.md) | Attempt to write to a port. |
|
||||||
| [vsprintf(format, args)](./bitburner.ns.vsprintf.md) | Format a string with an array of arguments. |
|
| [vsprintf(format, args)](./bitburner.ns.vsprintf.md) | Format a string with an array of arguments. |
|
||||||
| [weaken(host, opts)](./bitburner.ns.weaken.md) | Reduce a server security level. |
|
| [weaken(host, opts)](./bitburner.ns.weaken.md) | Reduce a server security level. |
|
||||||
|
@ -9,19 +9,14 @@ Copy file between servers.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
scp(
|
scp(files: string | string[], source: string, destination: string): Promise<boolean>;
|
||||||
files: string[],
|
|
||||||
source: string,
|
|
||||||
// tslint:disable-next-line:unified-signatures
|
|
||||||
destination: string,
|
|
||||||
): Promise<boolean>;
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| files | string\[\] | Filename or an array of filenames of script/literature files to copy. |
|
| files | string \| string\[\] | Filename or an array of filenames of script/literature files to copy. |
|
||||||
| source | string | Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server. |
|
| source | string | Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server. |
|
||||||
| destination | string | Host of the destination server, which is the server to which the file will be copied. |
|
| destination | string | Host of the destination server, which is the server to which the file will be copied. |
|
||||||
|
|
||||||
|
@ -9,14 +9,15 @@ Prints a raw value or a variable to the Terminal.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
tprintf(msg: any): void;
|
tprintf(format: string, ...values: any[]): void;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| msg | any | Value to be printed. |
|
| format | string | format of the message |
|
||||||
|
| values | any\[\] | |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
|
@ -9,11 +9,11 @@ Run the backdoor command in the terminal.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
installBackdoor(): Promise<boolean>;
|
installBackdoor(): Promise<void>;
|
||||||
```
|
```
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
Promise<boolean>
|
Promise<void>
|
||||||
|
|
||||||
True if the installation was successful.
|
True if the installation was successful.
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ interface IServerProps {
|
|||||||
|
|
||||||
function ServerAccordion(props: IServerProps): React.ReactElement {
|
function ServerAccordion(props: IServerProps): React.ReactElement {
|
||||||
const server = GetServer(props.hostname);
|
const server = GetServer(props.hostname);
|
||||||
if (server === null) throw new Error("server should not be null");
|
if (server === null) throw new Error(`server '${props.hostname}' should not be null`);
|
||||||
let totalSize = 0;
|
let totalSize = 0;
|
||||||
for (const f of server.scripts) {
|
for (const f of server.scripts) {
|
||||||
totalSize += f.code.length;
|
totalSize += f.code.length;
|
||||||
@ -100,8 +100,8 @@ interface IProps {
|
|||||||
|
|
||||||
export function FileDiagnosticModal(props: IProps): React.ReactElement {
|
export function FileDiagnosticModal(props: IProps): React.ReactElement {
|
||||||
const keys: string[] = [];
|
const keys: string[] = [];
|
||||||
for (const key in GetAllServers()) {
|
for (const key of GetAllServers()) {
|
||||||
keys.push(key);
|
keys.push(key.hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -192,7 +192,7 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
|
|||||||
powerful upgrades that will enhance your abilities.
|
powerful upgrades that will enhance your abilities.
|
||||||
<br />
|
<br />
|
||||||
Reputation: <Reputation reputation={props.faction.playerReputation} /> Favor:{" "}
|
Reputation: <Reputation reputation={props.faction.playerReputation} /> Favor:{" "}
|
||||||
<Favor favor={props.faction.favor} />
|
<Favor favor={Math.floor(props.faction.favor)} />
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box display="flex">
|
<Box display="flex">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
@ -286,7 +286,7 @@ export const RamCosts: IMap<any> = {
|
|||||||
getTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
getTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||||
setTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
setTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||||
getCityEstimatedPopulation: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
getCityEstimatedPopulation: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||||
getCityEstimatedCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
getCityCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||||
getCityChaos: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
getCityChaos: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||||
getCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
getCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||||
switchCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
switchCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||||
|
Loading…
Reference in New Issue
Block a user