mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-27 00:17:32 +01:00
commit
c080f367b8
35
dist/bitburner.d.ts
vendored
35
dist/bitburner.d.ts
vendored
@ -808,9 +808,9 @@ export declare interface CodingContract {
|
||||
*
|
||||
* @param filename - Filename of the contract.
|
||||
* @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, data type depends on contract type.;
|
||||
*/
|
||||
getData(filename: string, host?: string): string;
|
||||
getData(filename: string, host?: string): any;
|
||||
|
||||
/**
|
||||
* Get the number of attempt remaining.
|
||||
@ -2128,9 +2128,9 @@ export declare interface NodeStats {
|
||||
* <b>Basic ns1 usage example:</b>
|
||||
* ```ts
|
||||
* // Basic ns functions can be used directly
|
||||
* methodName();
|
||||
* getHostname();
|
||||
* // Some related functions are gathered within a common namespace
|
||||
* property.methodName();
|
||||
* stock.getPrice();
|
||||
* ```
|
||||
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs}
|
||||
* <hr>
|
||||
@ -2138,9 +2138,9 @@ export declare interface NodeStats {
|
||||
* ```ts
|
||||
* export async function main(ns) {
|
||||
* // Basic ns functions can be accessed on the ns object
|
||||
* await ns.methodName;
|
||||
* await ns.getHostname();
|
||||
* // Some related functions are gathered under a sub-property of the ns object
|
||||
* await ns.property.methodName;
|
||||
* await ns.stock.getPrice();
|
||||
* }
|
||||
* ```
|
||||
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}
|
||||
@ -2344,7 +2344,7 @@ export declare interface NS extends Singularity {
|
||||
* ```ts
|
||||
* //For example, assume the following returns 0.01:
|
||||
* hackAnalyze("foodnstuff");
|
||||
* //This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N*0.01% of its total money.
|
||||
* //This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.
|
||||
* ```
|
||||
* @param host - Hostname of the target server.
|
||||
* @returns The percentage of money you will steal from the target server with a single hack.
|
||||
@ -3022,7 +3022,7 @@ export declare interface NS extends Singularity {
|
||||
* RAM cost: 0.1 GB
|
||||
*
|
||||
* Returns the server’s instrinsic “growth parameter”. This growth
|
||||
* parameter is a number between 1 and 100 that represents how
|
||||
* parameter is a number between 0 and 100 that represents how
|
||||
* quickly the server’s money grows. This parameter affects the
|
||||
* percentage by which the server’s money is increased when using the
|
||||
* grow function. A higher growth parameter will result in a
|
||||
@ -4866,6 +4866,25 @@ export declare interface Singularity {
|
||||
* @returns True if the installation was successful.
|
||||
*/
|
||||
installBackdoor(): Promise<void>;
|
||||
|
||||
/**
|
||||
* SF4.2 - Check if the player is focused.
|
||||
* @remarks
|
||||
* RAM cost: 0.1 GB
|
||||
*
|
||||
*
|
||||
* @returns True if the player is focused.
|
||||
*/
|
||||
isFocused(): boolean;
|
||||
|
||||
/**
|
||||
* SF4.2 - Set the players focus.
|
||||
* @remarks
|
||||
* RAM cost: 0.1 GB
|
||||
*
|
||||
* @returns True if the focus was changed.
|
||||
*/
|
||||
setFocus(focus: boolean): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4998,7 +4998,7 @@
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"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 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",
|
||||
"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, data type depends on contract type.;\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -5022,7 +5022,7 @@
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "string"
|
||||
"text": "any"
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -14221,7 +14221,7 @@
|
||||
{
|
||||
"kind": "Interface",
|
||||
"canonicalReference": "bitburner!NS:interface",
|
||||
"docComment": "/**\n * Collection of all functions passed to scripts\n *\n * @remarks\n *\n * <b>Basic ns1 usage example:</b>\n * ```ts\n * // Basic ns functions can be used directly\n * methodName();\n * // Some related functions are gathered within a common namespace\n * property.methodName();\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html | ns1 in-game docs} <hr> <b>Basic ns2 usage example:</b>\n * ```ts\n * export async function main(ns) {\n * // Basic ns functions can be accessed on the ns object\n * await ns.methodName;\n * // Some related functions are gathered under a sub-property of the ns object\n * await ns.property.methodName;\n * }\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html | ns2 in-game docs} <hr>\n *\n * @public\n */\n",
|
||||
"docComment": "/**\n * Collection of all functions passed to scripts\n *\n * @remarks\n *\n * <b>Basic ns1 usage example:</b>\n * ```ts\n * // Basic ns functions can be used directly\n * getHostname();\n * // Some related functions are gathered within a common namespace\n * stock.getPrice();\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html | ns1 in-game docs} <hr> <b>Basic ns2 usage example:</b>\n * ```ts\n * export async function main(ns) {\n * // Basic ns functions can be accessed on the ns object\n * await ns.getHostname();\n * // Some related functions are gathered under a sub-property of the ns object\n * await ns.stock.getPrice();\n * }\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html | ns2 in-game docs} <hr>\n *\n * @public\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -16063,7 +16063,7 @@
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"canonicalReference": "bitburner!NS#getServerGrowth:member(1)",
|
||||
"docComment": "/**\n * Get a server growth parameter.\n *\n * @remarks\n *\n * RAM cost: 0.1 GB\n *\n * Returns the server’s instrinsic “growth parameter”. This growth parameter is a number between 1 and 100 that represents how quickly the server’s money grows. This parameter affects the percentage by which the server’s money is increased when using the grow function. A higher growth parameter will result in a higher percentage increase from grow.\n *\n * @param host - Host of target server.\n *\n * @returns Parameter that affects the percentage by which the server’s money is increased when using the grow function.\n */\n",
|
||||
"docComment": "/**\n * Get a server growth parameter.\n *\n * @remarks\n *\n * RAM cost: 0.1 GB\n *\n * Returns the server’s instrinsic “growth parameter”. This growth parameter is a number between 0 and 100 that represents how quickly the server’s money grows. This parameter affects the percentage by which the server’s money is increased when using the grow function. A higher growth parameter will result in a higher percentage increase from grow.\n *\n * @param host - Host of target server.\n *\n * @returns Parameter that affects the percentage by which the server’s money is increased when using the grow function.\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -16823,7 +16823,7 @@
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"canonicalReference": "bitburner!NS#hackAnalyze:member(1)",
|
||||
"docComment": "/**\n * Get the percent of money stolen with a single thread.\n *\n * @remarks\n *\n * RAM cost: 1 GB\n *\n * Returns the percentage of the specified server’s money you will steal with a single hack. This value is returned in percentage form, not decimal (Netscript functions typically return in decimal form, but not this one).\n *\n * @param host - Hostname of the target server.\n *\n * @returns The percentage of money you will steal from the target server with a single hack.\n *\n * @example\n * ```ts\n * //For example, assume the following returns 0.01:\n * hackAnalyze(\"foodnstuff\");\n * //This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N*0.01% of its total money.\n * ```\n *\n */\n",
|
||||
"docComment": "/**\n * Get the percent of money stolen with a single thread.\n *\n * @remarks\n *\n * RAM cost: 1 GB\n *\n * Returns the percentage of the specified server’s money you will steal with a single hack. This value is returned in percentage form, not decimal (Netscript functions typically return in decimal form, but not this one).\n *\n * @param host - Hostname of the target server.\n *\n * @returns The percentage of money you will steal from the target server with a single hack.\n *\n * @example\n * ```ts\n * //For example, assume the following returns 0.01:\n * hackAnalyze(\"foodnstuff\");\n * //This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.\n * ```\n *\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -25308,6 +25308,34 @@
|
||||
"parameters": [],
|
||||
"name": "isBusy"
|
||||
},
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"canonicalReference": "bitburner!Singularity#isFocused:member(1)",
|
||||
"docComment": "/**\n * SF4.2 - Check if the player is focused.\n *\n * @remarks\n *\n * RAM cost: 0.1 GB\n *\n * @returns True if the player is focused.\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "isFocused(): "
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "boolean"
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": ";"
|
||||
}
|
||||
],
|
||||
"isOptional": false,
|
||||
"returnTypeTokenRange": {
|
||||
"startIndex": 1,
|
||||
"endIndex": 2
|
||||
},
|
||||
"releaseTag": "Public",
|
||||
"overloadIndex": 1,
|
||||
"parameters": [],
|
||||
"name": "isFocused"
|
||||
},
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"canonicalReference": "bitburner!Singularity#joinFaction:member(1)",
|
||||
@ -25516,6 +25544,50 @@
|
||||
"parameters": [],
|
||||
"name": "purchaseTor"
|
||||
},
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"canonicalReference": "bitburner!Singularity#setFocus:member(1)",
|
||||
"docComment": "/**\n * SF4.2 - Set the players focus.\n *\n * @remarks\n *\n * RAM cost: 0.1 GB\n *\n * @returns True if the focus was changed.\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "setFocus(focus: "
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "boolean"
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "): "
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "boolean"
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": ";"
|
||||
}
|
||||
],
|
||||
"isOptional": false,
|
||||
"returnTypeTokenRange": {
|
||||
"startIndex": 3,
|
||||
"endIndex": 4
|
||||
},
|
||||
"releaseTag": "Public",
|
||||
"overloadIndex": 1,
|
||||
"parameters": [
|
||||
{
|
||||
"parameterName": "focus",
|
||||
"parameterTypeTokenRange": {
|
||||
"startIndex": 1,
|
||||
"endIndex": 2
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "setFocus"
|
||||
},
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"canonicalReference": "bitburner!Singularity#softReset:member(1)",
|
||||
|
@ -9,7 +9,7 @@ Get the input data.
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getData(filename: string, host?: string): string;
|
||||
getData(filename: string, host?: string): any;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@ -21,9 +21,9 @@ getData(filename: string, host?: string): string;
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
string
|
||||
any
|
||||
|
||||
The specified contract’s data;
|
||||
The specified contract’s data, data type depends on contract type.;
|
||||
|
||||
## Remarks
|
||||
|
||||
|
@ -28,5 +28,5 @@ Parameter that affects the percentage by which the server’s money is increased
|
||||
|
||||
RAM cost: 0.1 GB
|
||||
|
||||
Returns the server’s instrinsic “growth parameter”. This growth parameter is a number between 1 and 100 that represents how quickly the server’s money grows. This parameter affects the percentage by which the server’s money is increased when using the grow function. A higher growth parameter will result in a higher percentage increase from grow.
|
||||
Returns the server’s instrinsic “growth parameter”. This growth parameter is a number between 0 and 100 that represents how quickly the server’s money grows. This parameter affects the percentage by which the server’s money is increased when using the grow function. A higher growth parameter will result in a higher percentage increase from grow.
|
||||
|
||||
|
@ -36,6 +36,6 @@ Returns the percentage of the specified server’s money you will steal with a s
|
||||
```ts
|
||||
//For example, assume the following returns 0.01:
|
||||
hackAnalyze("foodnstuff");
|
||||
//This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N*0.01% of its total money.
|
||||
//This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.
|
||||
```
|
||||
|
||||
|
@ -9,9 +9,8 @@ Collection of all functions passed to scripts
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface NS extends Singularity
|
||||
export interface NS extends Singularity
|
||||
```
|
||||
|
||||
<b>Extends:</b> [Singularity](./bitburner.singularity.md)
|
||||
|
||||
## Remarks
|
||||
@ -19,139 +18,138 @@ export interface NS extends Singularity
|
||||
<b>Basic ns1 usage example:</b>
|
||||
|
||||
```ts
|
||||
// Basic ns functions can be used directly
|
||||
methodName();
|
||||
// Some related functions are gathered within a common namespace
|
||||
property.methodName();
|
||||
// Basic ns functions can be used directly
|
||||
getHostname();
|
||||
// Some related functions are gathered within a common namespace
|
||||
stock.getPrice();
|
||||
```
|
||||
|
||||
[ns1 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html) <hr> <b>Basic ns2 usage example:</b>
|
||||
|
||||
```ts
|
||||
export async function main(ns) {
|
||||
// Basic ns functions can be accessed on the ns object
|
||||
await ns.methodName;
|
||||
// Some related functions are gathered under a sub-property of the ns object
|
||||
await ns.property.methodName;
|
||||
// Basic ns functions can be accessed on the ns object
|
||||
await ns.getHostname();
|
||||
// Some related functions are gathered under a sub-property of the ns object
|
||||
await ns.stock.getPrice();
|
||||
}
|
||||
```
|
||||
|
||||
[ns2 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html) <hr>
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| -------------------------------------------------- | ----------------------------------------------- | --------------------------------------------------- |
|
||||
| [args](./bitburner.ns.args.md) | (string \| number \| boolean)\[\] | Arguments passed into the script. |
|
||||
| [bladeburner](./bitburner.ns.bladeburner.md) | [Bladeburner](./bitburner.bladeburner.md) | Namespace for bladeburner functions. |
|
||||
| [codingcontract](./bitburner.ns.codingcontract.md) | [CodingContract](./bitburner.codingcontract.md) | Namespace for codingcontract functions. |
|
||||
| [corporation](./bitburner.ns.corporation.md) | [Corporation](./bitburner.corporation.md) | Namespace for corporation functions. RAM cost: 0 GB |
|
||||
| [formulas](./bitburner.ns.formulas.md) | [Formulas](./bitburner.formulas.md) | Namespace for formulas functions. |
|
||||
| [gang](./bitburner.ns.gang.md) | [Gang](./bitburner.gang.md) | Namespace for gang functions. |
|
||||
| [hacknet](./bitburner.ns.hacknet.md) | [Hacknet](./bitburner.hacknet.md) | Namespace for hacknet functions. |
|
||||
| [sleeve](./bitburner.ns.sleeve.md) | [Sleeve](./bitburner.sleeve.md) | Namespace for sleeve functions. |
|
||||
| [stanek](./bitburner.ns.stanek.md) | [Stanek](./bitburner.stanek.md) | Namespace for stanek functions. RAM cost: 0 GB |
|
||||
| [stock](./bitburner.ns.stock.md) | [TIX](./bitburner.tix.md) | Namespace for stock functions. |
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [args](./bitburner.ns.args.md) | (string \| number \| boolean)\[\] | Arguments passed into the script. |
|
||||
| [bladeburner](./bitburner.ns.bladeburner.md) | [Bladeburner](./bitburner.bladeburner.md) | Namespace for bladeburner functions. |
|
||||
| [codingcontract](./bitburner.ns.codingcontract.md) | [CodingContract](./bitburner.codingcontract.md) | Namespace for codingcontract functions. |
|
||||
| [corporation](./bitburner.ns.corporation.md) | [Corporation](./bitburner.corporation.md) | Namespace for corporation functions. RAM cost: 0 GB |
|
||||
| [formulas](./bitburner.ns.formulas.md) | [Formulas](./bitburner.formulas.md) | Namespace for formulas functions. |
|
||||
| [gang](./bitburner.ns.gang.md) | [Gang](./bitburner.gang.md) | Namespace for gang functions. |
|
||||
| [hacknet](./bitburner.ns.hacknet.md) | [Hacknet](./bitburner.hacknet.md) | Namespace for hacknet functions. |
|
||||
| [sleeve](./bitburner.ns.sleeve.md) | [Sleeve](./bitburner.sleeve.md) | Namespace for sleeve functions. |
|
||||
| [stanek](./bitburner.ns.stanek.md) | [Stanek](./bitburner.stanek.md) | Namespace for stanek functions. RAM cost: 0 GB |
|
||||
| [stock](./bitburner.ns.stock.md) | [TIX](./bitburner.tix.md) | Namespace for stock functions. |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
||||
| [alert(msg)](./bitburner.ns.alert.md) | Open up a message box. |
|
||||
| [asleep(millis)](./bitburner.ns.asleep.md) | Suspends the script for n milliseconds. Doesn't block with concurrent calls. |
|
||||
| [atExit(f)](./bitburner.ns.atexit.md) | Add callback function when the script dies |
|
||||
| [brutessh(host)](./bitburner.ns.brutessh.md) | Runs BruteSSH.exe on a server. |
|
||||
| [clear(handle)](./bitburner.ns.clear.md) | Clear data from a file. |
|
||||
| [clearLog()](./bitburner.ns.clearlog.md) | Clears the script’s logs. |
|
||||
| [clearPort(handle)](./bitburner.ns.clearport.md) | Clear data from a port. |
|
||||
| [deleteServer(host)](./bitburner.ns.deleteserver.md) | Delete a purchased server. |
|
||||
| [disableLog(fn)](./bitburner.ns.disablelog.md) | Disables logging for the given function. |
|
||||
| [enableLog(fn)](./bitburner.ns.enablelog.md) | Enable logging for a certain function. |
|
||||
| [exec(script, host, numThreads, args)](./bitburner.ns.exec.md) | Start another script on any server. |
|
||||
| [exit()](./bitburner.ns.exit.md) | Terminates the current script immediately. |
|
||||
| [fileExists(filename, host)](./bitburner.ns.fileexists.md) | Check if a file exists. |
|
||||
| [flags(schema)](./bitburner.ns.flags.md) | Parse command line flags. |
|
||||
| [ftpcrack(host)](./bitburner.ns.ftpcrack.md) | Runs FTPCrack.exe on a server. |
|
||||
| [getBitNodeMultipliers()](./bitburner.ns.getbitnodemultipliers.md) | Get the current Bitnode multipliers. |
|
||||
| [getFavorToDonate()](./bitburner.ns.getfavortodonate.md) | Returns the amount of Faction favor required to be able to donate to a faction. |
|
||||
| [getGrowTime(host)](./bitburner.ns.getgrowtime.md) | Get the execution time of a grow() call. |
|
||||
| [getHackingLevel()](./bitburner.ns.gethackinglevel.md) | Returns the player’s current hacking level. |
|
||||
| [getHackingMultipliers()](./bitburner.ns.gethackingmultipliers.md) | Get hacking related multipliers. |
|
||||
| [getHacknetMultipliers()](./bitburner.ns.gethacknetmultipliers.md) | Get hacknet related multipliers. |
|
||||
| [getHackTime(host)](./bitburner.ns.gethacktime.md) | Get the execution time of a hack() call. |
|
||||
| [getHostname()](./bitburner.ns.gethostname.md) | Returns a string with the hostname of the server that the script is running on. |
|
||||
| [getOwnedSourceFiles()](./bitburner.ns.getownedsourcefiles.md) | Get a list of acquired Source-Files. |
|
||||
| [getPlayer()](./bitburner.ns.getplayer.md) | Get information about the player. |
|
||||
| [getPortHandle(port)](./bitburner.ns.getporthandle.md) | Get all data on a port. |
|
||||
| [getPurchasedServerCost(ram)](./bitburner.ns.getpurchasedservercost.md) | Get cost of purchasing a server. |
|
||||
| [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. |
|
||||
| [getPurchasedServers()](./bitburner.ns.getpurchasedservers.md) | Returns an array with the hostnames of all of the servers you have purchased. |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [getScriptName()](./bitburner.ns.getscriptname.md) | Returns the current script name. |
|
||||
| [getScriptRam(script, host)](./bitburner.ns.getscriptram.md) | Get the ram cost of a script. |
|
||||
| [getServer(host)](./bitburner.ns.getserver.md) | Returns a server object for the given server. Defaults to the running script's server if host is not specified. |
|
||||
| [getServerBaseSecurityLevel(host)](./bitburner.ns.getserverbasesecuritylevel.md) | |
|
||||
| [getServerGrowth(host)](./bitburner.ns.getservergrowth.md) | Get a server growth parameter. |
|
||||
| [getServerMaxMoney(host)](./bitburner.ns.getservermaxmoney.md) | Get maximum money available on a server. |
|
||||
| [getServerMaxRam(host)](./bitburner.ns.getservermaxram.md) | Get the max RAM on a server. |
|
||||
| [getServerMinSecurityLevel(host)](./bitburner.ns.getserverminsecuritylevel.md) | Returns the minimum security level of the target server. |
|
||||
| [getServerMoneyAvailable(host)](./bitburner.ns.getservermoneyavailable.md) | Get money available on a server. |
|
||||
| [getServerNumPortsRequired(host)](./bitburner.ns.getservernumportsrequired.md) | Returns the number of open ports required to successfully run NUKE.exe on the specified server. |
|
||||
| [getServerRam(host)](./bitburner.ns.getserverram.md) | |
|
||||
| [getServerRequiredHackingLevel(host)](./bitburner.ns.getserverrequiredhackinglevel.md) | Returns the required hacking level of the target server. |
|
||||
| [getServerSecurityLevel(host)](./bitburner.ns.getserversecuritylevel.md) | Get server security level. |
|
||||
| [getServerUsedRam(host)](./bitburner.ns.getserverusedram.md) | Get the used RAM on a server. |
|
||||
| [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. |
|
||||
| [grow(host, opts)](./bitburner.ns.grow.md) | Spoof money in a servers bank account, increasing the amount available. |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [hackAnalyzeChance(host)](./bitburner.ns.hackanalyzechance.md) | Get the chance of successfully hacking a server. |
|
||||
| [hackAnalyzeSecurity(threads)](./bitburner.ns.hackanalyzesecurity.md) | Get the security increase for a number of thread. |
|
||||
| [hackAnalyzeThreads(host, hackAmount)](./bitburner.ns.hackanalyzethreads.md) | Predict the effect of hack. |
|
||||
| [hasRootAccess(host)](./bitburner.ns.hasrootaccess.md) | Check if your have root access on a server. |
|
||||
| [httpworm(host)](./bitburner.ns.httpworm.md) | Runs HTTPWorm.exe on a server. |
|
||||
| [isLogEnabled(fn)](./bitburner.ns.islogenabled.md) | Checks the status of the logging for the given function. |
|
||||
| [isRunning(script, host, args)](./bitburner.ns.isrunning.md) | Check if a script is running. |
|
||||
| [kill(script, host, args)](./bitburner.ns.kill.md) | Terminate another script. |
|
||||
| [killall(host)](./bitburner.ns.killall.md) | Terminate all scripts on a server. |
|
||||
| [ls(host, grep)](./bitburner.ns.ls.md) | List files on a server. |
|
||||
| [nFormat(n, format)](./bitburner.ns.nformat.md) | Format a number |
|
||||
| [nuke(host)](./bitburner.ns.nuke.md) | Runs NUKE.exe on a server. |
|
||||
| [peek(port)](./bitburner.ns.peek.md) | Get a copy of the data from a port without popping it. |
|
||||
| [print(msg)](./bitburner.ns.print.md) | Prints a value or a variable to the script’s logs. |
|
||||
| [prompt(txt)](./bitburner.ns.prompt.md) | Prompt the player with a Yes/No modal. |
|
||||
| [ps(host)](./bitburner.ns.ps.md) | List running scripts on a server. |
|
||||
| [purchaseServer(hostname, ram)](./bitburner.ns.purchaseserver.md) | Purchase a server. |
|
||||
| [read(handle)](./bitburner.ns.read.md) | Read content of a file. |
|
||||
| [readPort(port)](./bitburner.ns.readport.md) | Read data from a port. |
|
||||
| [relaysmtp(host)](./bitburner.ns.relaysmtp.md) | Runs relaySMTP.exe on a server. |
|
||||
| [rm(name, host)](./bitburner.ns.rm.md) | Delete a file. |
|
||||
| [run(script, numThreads, args)](./bitburner.ns.run.md) | Start another script on the current server. |
|
||||
| [scan(host, hostnames)](./bitburner.ns.scan.md) | Get the list servers connected to a server. |
|
||||
| [scp(files, source, destination)](./bitburner.ns.scp.md) | Copy file between servers. |
|
||||
| [scriptKill(script, host)](./bitburner.ns.scriptkill.md) | Kill all scripts with a filename. |
|
||||
| [scriptRunning(script, host)](./bitburner.ns.scriptrunning.md) | Check if any script with a filename is running. |
|
||||
| [serverExists(host)](./bitburner.ns.serverexists.md) | Returns a boolean denoting whether or not the specified server exists. |
|
||||
| [sleep(millis)](./bitburner.ns.sleep.md) | Suspends the script for n milliseconds. |
|
||||
| [spawn(script, numThreads, args)](./bitburner.ns.spawn.md) | Terminate current script and start another in 10s. |
|
||||
| [sprintf(format, args)](./bitburner.ns.sprintf.md) | Format a string. |
|
||||
| [sqlinject(host)](./bitburner.ns.sqlinject.md) | Runs SQLInject.exe on a server. |
|
||||
| [tail(fn, host, args)](./bitburner.ns.tail.md) | Open the tail window of a script. |
|
||||
| [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). |
|
||||
| [tprint(msg)](./bitburner.ns.tprint.md) | Prints a 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. |
|
||||
| [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. |
|
||||
| [weakenAnalyze(threads, cores)](./bitburner.ns.weakenanalyze.md) | Predict the effect of weaken. |
|
||||
| [wget(url, target, host)](./bitburner.ns.wget.md) | Download a file from the internet. |
|
||||
| [write(handle, data, mode)](./bitburner.ns.write.md) | Write data to a file. |
|
||||
| [writePort(port, data)](./bitburner.ns.writeport.md) | Write data to a port. |
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [alert(msg)](./bitburner.ns.alert.md) | Open up a message box. |
|
||||
| [asleep(millis)](./bitburner.ns.asleep.md) | Suspends the script for n milliseconds. Doesn't block with concurrent calls. |
|
||||
| [atExit(f)](./bitburner.ns.atexit.md) | Add callback function when the script dies |
|
||||
| [brutessh(host)](./bitburner.ns.brutessh.md) | Runs BruteSSH.exe on a server. |
|
||||
| [clear(handle)](./bitburner.ns.clear.md) | Clear data from a file. |
|
||||
| [clearLog()](./bitburner.ns.clearlog.md) | Clears the script’s logs. |
|
||||
| [clearPort(handle)](./bitburner.ns.clearport.md) | Clear data from a port. |
|
||||
| [deleteServer(host)](./bitburner.ns.deleteserver.md) | Delete a purchased server. |
|
||||
| [disableLog(fn)](./bitburner.ns.disablelog.md) | Disables logging for the given function. |
|
||||
| [enableLog(fn)](./bitburner.ns.enablelog.md) | Enable logging for a certain function. |
|
||||
| [exec(script, host, numThreads, args)](./bitburner.ns.exec.md) | Start another script on any server. |
|
||||
| [exit()](./bitburner.ns.exit.md) | Terminates the current script immediately. |
|
||||
| [fileExists(filename, host)](./bitburner.ns.fileexists.md) | Check if a file exists. |
|
||||
| [flags(schema)](./bitburner.ns.flags.md) | Parse command line flags. |
|
||||
| [ftpcrack(host)](./bitburner.ns.ftpcrack.md) | Runs FTPCrack.exe on a server. |
|
||||
| [getBitNodeMultipliers()](./bitburner.ns.getbitnodemultipliers.md) | Get the current Bitnode multipliers. |
|
||||
| [getFavorToDonate()](./bitburner.ns.getfavortodonate.md) | Returns the amount of Faction favor required to be able to donate to a faction. |
|
||||
| [getGrowTime(host)](./bitburner.ns.getgrowtime.md) | Get the execution time of a grow() call. |
|
||||
| [getHackingLevel()](./bitburner.ns.gethackinglevel.md) | Returns the player’s current hacking level. |
|
||||
| [getHackingMultipliers()](./bitburner.ns.gethackingmultipliers.md) | Get hacking related multipliers. |
|
||||
| [getHacknetMultipliers()](./bitburner.ns.gethacknetmultipliers.md) | Get hacknet related multipliers. |
|
||||
| [getHackTime(host)](./bitburner.ns.gethacktime.md) | Get the execution time of a hack() call. |
|
||||
| [getHostname()](./bitburner.ns.gethostname.md) | Returns a string with the hostname of the server that the script is running on. |
|
||||
| [getOwnedSourceFiles()](./bitburner.ns.getownedsourcefiles.md) | Get a list of acquired Source-Files. |
|
||||
| [getPlayer()](./bitburner.ns.getplayer.md) | Get information about the player. |
|
||||
| [getPortHandle(port)](./bitburner.ns.getporthandle.md) | Get all data on a port. |
|
||||
| [getPurchasedServerCost(ram)](./bitburner.ns.getpurchasedservercost.md) | Get cost of purchasing a server. |
|
||||
| [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. |
|
||||
| [getPurchasedServers()](./bitburner.ns.getpurchasedservers.md) | Returns an array with the hostnames of all of the servers you have purchased. |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [getScriptName()](./bitburner.ns.getscriptname.md) | Returns the current script name. |
|
||||
| [getScriptRam(script, host)](./bitburner.ns.getscriptram.md) | Get the ram cost of a script. |
|
||||
| [getServer(host)](./bitburner.ns.getserver.md) | Returns a server object for the given server. Defaults to the running script's server if host is not specified. |
|
||||
| [getServerBaseSecurityLevel(host)](./bitburner.ns.getserverbasesecuritylevel.md) | |
|
||||
| [getServerGrowth(host)](./bitburner.ns.getservergrowth.md) | Get a server growth parameter. |
|
||||
| [getServerMaxMoney(host)](./bitburner.ns.getservermaxmoney.md) | Get maximum money available on a server. |
|
||||
| [getServerMaxRam(host)](./bitburner.ns.getservermaxram.md) | Get the max RAM on a server. |
|
||||
| [getServerMinSecurityLevel(host)](./bitburner.ns.getserverminsecuritylevel.md) | Returns the minimum security level of the target server. |
|
||||
| [getServerMoneyAvailable(host)](./bitburner.ns.getservermoneyavailable.md) | Get money available on a server. |
|
||||
| [getServerNumPortsRequired(host)](./bitburner.ns.getservernumportsrequired.md) | Returns the number of open ports required to successfully run NUKE.exe on the specified server. |
|
||||
| [getServerRam(host)](./bitburner.ns.getserverram.md) | |
|
||||
| [getServerRequiredHackingLevel(host)](./bitburner.ns.getserverrequiredhackinglevel.md) | Returns the required hacking level of the target server. |
|
||||
| [getServerSecurityLevel(host)](./bitburner.ns.getserversecuritylevel.md) | Get server security level. |
|
||||
| [getServerUsedRam(host)](./bitburner.ns.getserverusedram.md) | Get the used RAM on a server. |
|
||||
| [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. |
|
||||
| [grow(host, opts)](./bitburner.ns.grow.md) | Spoof money in a servers bank account, increasing the amount available. |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [hackAnalyzeChance(host)](./bitburner.ns.hackanalyzechance.md) | Get the chance of successfully hacking a server. |
|
||||
| [hackAnalyzeSecurity(threads)](./bitburner.ns.hackanalyzesecurity.md) | Get the security increase for a number of thread. |
|
||||
| [hackAnalyzeThreads(host, hackAmount)](./bitburner.ns.hackanalyzethreads.md) | Predict the effect of hack. |
|
||||
| [hasRootAccess(host)](./bitburner.ns.hasrootaccess.md) | Check if your have root access on a server. |
|
||||
| [httpworm(host)](./bitburner.ns.httpworm.md) | Runs HTTPWorm.exe on a server. |
|
||||
| [isLogEnabled(fn)](./bitburner.ns.islogenabled.md) | Checks the status of the logging for the given function. |
|
||||
| [isRunning(script, host, args)](./bitburner.ns.isrunning.md) | Check if a script is running. |
|
||||
| [kill(script, host, args)](./bitburner.ns.kill.md) | Terminate another script. |
|
||||
| [killall(host)](./bitburner.ns.killall.md) | Terminate all scripts on a server. |
|
||||
| [ls(host, grep)](./bitburner.ns.ls.md) | List files on a server. |
|
||||
| [nFormat(n, format)](./bitburner.ns.nformat.md) | Format a number |
|
||||
| [nuke(host)](./bitburner.ns.nuke.md) | Runs NUKE.exe on a server. |
|
||||
| [peek(port)](./bitburner.ns.peek.md) | Get a copy of the data from a port without popping it. |
|
||||
| [print(msg)](./bitburner.ns.print.md) | Prints a value or a variable to the script’s logs. |
|
||||
| [prompt(txt)](./bitburner.ns.prompt.md) | Prompt the player with a Yes/No modal. |
|
||||
| [ps(host)](./bitburner.ns.ps.md) | List running scripts on a server. |
|
||||
| [purchaseServer(hostname, ram)](./bitburner.ns.purchaseserver.md) | Purchase a server. |
|
||||
| [read(handle)](./bitburner.ns.read.md) | Read content of a file. |
|
||||
| [readPort(port)](./bitburner.ns.readport.md) | Read data from a port. |
|
||||
| [relaysmtp(host)](./bitburner.ns.relaysmtp.md) | Runs relaySMTP.exe on a server. |
|
||||
| [rm(name, host)](./bitburner.ns.rm.md) | Delete a file. |
|
||||
| [run(script, numThreads, args)](./bitburner.ns.run.md) | Start another script on the current server. |
|
||||
| [scan(host, hostnames)](./bitburner.ns.scan.md) | Get the list servers connected to a server. |
|
||||
| [scp(files, source, destination)](./bitburner.ns.scp.md) | Copy file between servers. |
|
||||
| [scriptKill(script, host)](./bitburner.ns.scriptkill.md) | Kill all scripts with a filename. |
|
||||
| [scriptRunning(script, host)](./bitburner.ns.scriptrunning.md) | Check if any script with a filename is running. |
|
||||
| [serverExists(host)](./bitburner.ns.serverexists.md) | Returns a boolean denoting whether or not the specified server exists. |
|
||||
| [sleep(millis)](./bitburner.ns.sleep.md) | Suspends the script for n milliseconds. |
|
||||
| [spawn(script, numThreads, args)](./bitburner.ns.spawn.md) | Terminate current script and start another in 10s. |
|
||||
| [sprintf(format, args)](./bitburner.ns.sprintf.md) | Format a string. |
|
||||
| [sqlinject(host)](./bitburner.ns.sqlinject.md) | Runs SQLInject.exe on a server. |
|
||||
| [tail(fn, host, args)](./bitburner.ns.tail.md) | Open the tail window of a script. |
|
||||
| [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). |
|
||||
| [tprint(msg)](./bitburner.ns.tprint.md) | Prints a 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. |
|
||||
| [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. |
|
||||
| [weakenAnalyze(threads, cores)](./bitburner.ns.weakenanalyze.md) | Predict the effect of weaken. |
|
||||
| [wget(url, target, host)](./bitburner.ns.wget.md) | Download a file from the internet. |
|
||||
| [write(handle, data, mode)](./bitburner.ns.write.md) | Write data to a file. |
|
||||
| [writePort(port, data)](./bitburner.ns.writeport.md) | Write data to a port. |
|
||||
|
||||
|
23
markdown/bitburner.singularity.isfocused.md
Normal file
23
markdown/bitburner.singularity.isfocused.md
Normal file
@ -0,0 +1,23 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [isFocused](./bitburner.singularity.isfocused.md)
|
||||
|
||||
## Singularity.isFocused() method
|
||||
|
||||
SF4.2 - Check if the player is focused.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isFocused(): boolean;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
boolean
|
||||
|
||||
True if the player is focused.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0.1 GB
|
||||
|
@ -52,11 +52,13 @@ This API requires Source-File 4 level 1 / 2 / 3 to use.
|
||||
| [installAugmentations(cbScript)](./bitburner.singularity.installaugmentations.md) | SF4.3 - Install your purchased augmentations. |
|
||||
| [installBackdoor()](./bitburner.singularity.installbackdoor.md) | SF4.1 - Run the backdoor command in the terminal. |
|
||||
| [isBusy()](./bitburner.singularity.isbusy.md) | SF4.1 - Check if the player is busy. |
|
||||
| [isFocused()](./bitburner.singularity.isfocused.md) | SF4.2 - Check if the player is focused. |
|
||||
| [joinFaction(faction)](./bitburner.singularity.joinfaction.md) | SF4.2 - Join a faction. |
|
||||
| [manualHack()](./bitburner.singularity.manualhack.md) | SF4.1 - Run the hack command in the terminal. |
|
||||
| [purchaseAugmentation(faction, augmentation)](./bitburner.singularity.purchaseaugmentation.md) | SF4.3 - Purchase an augmentation |
|
||||
| [purchaseProgram(programName)](./bitburner.singularity.purchaseprogram.md) | SF4.1 - Purchase a program from the dark web. |
|
||||
| [purchaseTor()](./bitburner.singularity.purchasetor.md) | SF4.1 - Purchase the TOR router. |
|
||||
| [setFocus(focus)](./bitburner.singularity.setfocus.md) | SF4.2 - Set the players focus. |
|
||||
| [softReset(cbScript)](./bitburner.singularity.softreset.md) | SF4.3 - Soft reset the game. |
|
||||
| [stopAction()](./bitburner.singularity.stopaction.md) | SF4.1 - Stop the current action. |
|
||||
| [travelToCity(city)](./bitburner.singularity.traveltocity.md) | SF4.1 - Travel to another city. |
|
||||
|
30
markdown/bitburner.singularity.setfocus.md
Normal file
30
markdown/bitburner.singularity.setfocus.md
Normal file
@ -0,0 +1,30 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [setFocus](./bitburner.singularity.setfocus.md)
|
||||
|
||||
## Singularity.setFocus() method
|
||||
|
||||
SF4.2 - Set the players focus.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
setFocus(focus: boolean): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| focus | boolean | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
boolean
|
||||
|
||||
True if the focus was changed.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0.1 GB
|
||||
|
Loading…
Reference in New Issue
Block a user