mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 01:23:49 +01:00
commit
88666ec3fa
15
dist/bitburner.d.ts
vendored
15
dist/bitburner.d.ts
vendored
@ -2138,9 +2138,11 @@ export declare interface NodeStats {
|
||||
* ```ts
|
||||
* export async function main(ns) {
|
||||
* // Basic ns functions can be accessed on the ns object
|
||||
* await ns.getHostname();
|
||||
* ns.getHostname();
|
||||
* // Some related functions are gathered under a sub-property of the ns object
|
||||
* await ns.stock.getPrice();
|
||||
* ns.stock.getPrice();
|
||||
* // Some functions need to be await ed
|
||||
* await ns.hack('n00dles');
|
||||
* }
|
||||
* ```
|
||||
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}
|
||||
@ -2580,15 +2582,14 @@ export declare interface NS extends Singularity {
|
||||
* @remarks
|
||||
* RAM cost: 0.2 GB
|
||||
*
|
||||
* Returns an array containing the hostnames or IPs of all servers that are one
|
||||
* node way from the specified target server. The hostnames/IPs in the returned
|
||||
* Returns an array containing the hostnames of all servers that are one
|
||||
* node way from the specified target server. The hostnames in the returned
|
||||
* array are strings.
|
||||
*
|
||||
* @param host - Hostname of the server to scan.
|
||||
* @param hostnames - Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false).
|
||||
* @returns Returns an string of hostnames or IP.
|
||||
* @returns Returns an string of hostnames.
|
||||
*/
|
||||
scan(host: string, hostnames?: boolean): string[];
|
||||
scan(host?: string): string[];
|
||||
|
||||
/**
|
||||
* Runs NUKE.exe on a server.
|
||||
|
@ -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 * 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",
|
||||
"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 * ns.getHostname();\n * // Some related functions are gathered under a sub-property of the ns object\n * ns.stock.getPrice();\n * // Some functions need to be await ed\n * await ns.hack('n00dles');\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",
|
||||
@ -18037,24 +18037,16 @@
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"canonicalReference": "bitburner!NS#scan:member(1)",
|
||||
"docComment": "/**\n * Get the list servers connected to a server.\n *\n * @remarks\n *\n * RAM cost: 0.2 GB\n *\n * Returns an array containing the hostnames or IPs of all servers that are one node way from the specified target server. The hostnames/IPs in the returned array are strings.\n *\n * @param host - Hostname of the server to scan.\n *\n * @param hostnames - Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false).\n *\n * @returns Returns an string of hostnames or IP.\n */\n",
|
||||
"docComment": "/**\n * Get the list servers connected to a server.\n *\n * @remarks\n *\n * RAM cost: 0.2 GB\n *\n * Returns an array containing the hostnames of all servers that are one node way from the specified target server. The hostnames in the returned array are strings.\n *\n * @param host - Hostname of the server to scan.\n *\n * @returns Returns an string of hostnames.\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "scan(host: "
|
||||
"text": "scan(host?: "
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "string"
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": ", hostnames?: "
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "boolean"
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "): "
|
||||
@ -18070,8 +18062,8 @@
|
||||
],
|
||||
"isOptional": false,
|
||||
"returnTypeTokenRange": {
|
||||
"startIndex": 5,
|
||||
"endIndex": 6
|
||||
"startIndex": 3,
|
||||
"endIndex": 4
|
||||
},
|
||||
"releaseTag": "Public",
|
||||
"overloadIndex": 1,
|
||||
@ -18082,13 +18074,6 @@
|
||||
"startIndex": 1,
|
||||
"endIndex": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameterName": "hostnames",
|
||||
"parameterTypeTokenRange": {
|
||||
"startIndex": 3,
|
||||
"endIndex": 4
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "scan"
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -28,9 +28,11 @@ export interface NS extends Singularity
|
||||
```ts
|
||||
export async function main(ns) {
|
||||
// Basic ns functions can be accessed on the ns object
|
||||
await ns.getHostname();
|
||||
ns.getHostname();
|
||||
// Some related functions are gathered under a sub-property of the ns object
|
||||
await ns.stock.getPrice();
|
||||
ns.stock.getPrice();
|
||||
// Some functions need to be await ed
|
||||
await ns.hack('n00dles');
|
||||
}
|
||||
```
|
||||
[ns2 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html) <hr>
|
||||
@ -131,7 +133,7 @@ export async function main(ns) {
|
||||
| [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. |
|
||||
| [scan(host)](./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. |
|
||||
|
@ -9,7 +9,7 @@ Get the list servers connected to a server.
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
scan(host: string, hostnames?: boolean): string[];
|
||||
scan(host?: string): string[];
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@ -17,17 +17,16 @@ scan(host: string, hostnames?: boolean): string[];
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| host | string | Hostname of the server to scan. |
|
||||
| hostnames | boolean | Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false). |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
string\[\]
|
||||
|
||||
Returns an string of hostnames or IP.
|
||||
Returns an string of hostnames.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0.2 GB
|
||||
|
||||
Returns an array containing the hostnames or IPs of all servers that are one node way from the specified target server. The hostnames/IPs in the returned array are strings.
|
||||
Returns an array containing the hostnames of all servers that are one node way from the specified target server. The hostnames in the returned array are strings.
|
||||
|
||||
|
15
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
15
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -3740,9 +3740,11 @@ interface Stanek {
|
||||
* ```ts
|
||||
* export async function main(ns) {
|
||||
* // Basic ns functions can be accessed on the ns object
|
||||
* await ns.getHostname();
|
||||
* ns.getHostname();
|
||||
* // Some related functions are gathered under a sub-property of the ns object
|
||||
* await ns.stock.getPrice();
|
||||
* ns.stock.getPrice();
|
||||
* // Some functions need to be await ed
|
||||
* await ns.hack('n00dles');
|
||||
* }
|
||||
* ```
|
||||
* {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}
|
||||
@ -4182,15 +4184,14 @@ export interface NS extends Singularity {
|
||||
* @remarks
|
||||
* RAM cost: 0.2 GB
|
||||
*
|
||||
* Returns an array containing the hostnames or IPs of all servers that are one
|
||||
* node way from the specified target server. The hostnames/IPs in the returned
|
||||
* Returns an array containing the hostnames of all servers that are one
|
||||
* node way from the specified target server. The hostnames in the returned
|
||||
* array are strings.
|
||||
*
|
||||
* @param host - Hostname of the server to scan.
|
||||
* @param hostnames - Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false).
|
||||
* @returns Returns an string of hostnames or IP.
|
||||
* @returns Returns an string of hostnames.
|
||||
*/
|
||||
scan(host: string, hostnames?: boolean): string[];
|
||||
scan(host?: string): string[];
|
||||
|
||||
/**
|
||||
* Runs NUKE.exe on a server.
|
||||
|
Loading…
Reference in New Issue
Block a user