diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index 483ebf0d4..f8a461da4 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -2124,6 +2124,18 @@ export declare interface NodeStats { /** * Collection of all functions passed to scripts * @public + * @remarks + * Basic ns1 usage example: + * ``` + * property.methodName; + * ``` + * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs} + *
+ * Basic ns2 usage example: + * ``` + * ns.property.methodName; + * ``` + * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs} */ export declare interface NS extends Singularity { /** @@ -2321,9 +2333,9 @@ export declare interface NS extends Singularity { * * @example * ```ts - * //For example, assume the following returns 1: + * //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% 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% of 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. @@ -3259,13 +3271,12 @@ export declare interface NS extends Singularity { deleteServer(host: string): boolean; /** - * Returns an array with either the hostnames or IPs of all of the servers you have purchased. + * Returns an array with the hostnames of all of the servers you have purchased. * * @remarks 2.25 GB - * @param hostnameMode - Optional. Defaults to true. Returns hostnames if true, and IPs if false. - * @returns Returns an array with either the hostnames or IPs of all of the servers you have purchased. + * @returns Returns an array with the hostnames of all of the servers you have purchased. */ - getPurchasedServers(hostnameMode?: boolean): string[]; + getPurchasedServers(): string[]; /** * Returns the maximum number of servers you can purchase. diff --git a/input/bitburner.api.json b/input/bitburner.api.json index a508c9761..7625926d8 100644 --- a/input/bitburner.api.json +++ b/input/bitburner.api.json @@ -14221,7 +14221,7 @@ { "kind": "Interface", "canonicalReference": "bitburner!NS:interface", - "docComment": "/**\n * Collection of all functions passed to scripts\n *\n * @public\n */\n", + "docComment": "/**\n * Collection of all functions passed to scripts\n *\n * @remarks\n *\n * Basic ns1 usage example:\n * ```\n * property.methodName;\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html | ns1 in-game docs}
Basic ns2 usage example:\n * ```\n * ns.property.methodName;\n * ```\n *\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html | ns2 in-game docs}\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", @@ -15562,19 +15562,11 @@ { "kind": "MethodSignature", "canonicalReference": "bitburner!NS#getPurchasedServers:member(1)", - "docComment": "/**\n * Returns an array with either the hostnames or IPs of all of the servers you have purchased.\n *\n * @remarks\n *\n * 2.25 GB\n *\n * @param hostnameMode - Optional. Defaults to true. Returns hostnames if true, and IPs if false.\n *\n * @returns Returns an array with either the hostnames or IPs of all of the servers you have purchased.\n */\n", + "docComment": "/**\n * Returns an array with the hostnames of all of the servers you have purchased.\n *\n * @remarks\n *\n * 2.25 GB\n *\n * @returns Returns an array with the hostnames of all of the servers you have purchased.\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "getPurchasedServers(hostnameMode?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " + "text": "getPurchasedServers(): " }, { "kind": "Content", @@ -15587,20 +15579,12 @@ ], "isOptional": false, "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 + "startIndex": 1, + "endIndex": 2 }, "releaseTag": "Public", "overloadIndex": 1, - "parameters": [ - { - "parameterName": "hostnameMode", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], + "parameters": [], "name": "getPurchasedServers" }, { @@ -16839,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 1:\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% 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% of its total money.\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Content", diff --git a/markdown/bitburner.ns.getpurchasedservers.md b/markdown/bitburner.ns.getpurchasedservers.md index 757cf6f9e..3117ef93c 100644 --- a/markdown/bitburner.ns.getpurchasedservers.md +++ b/markdown/bitburner.ns.getpurchasedservers.md @@ -4,25 +4,18 @@ ## NS.getPurchasedServers() method -Returns an array with either the hostnames or IPs of all of the servers you have purchased. +Returns an array with the hostnames of all of the servers you have purchased. Signature: ```typescript -getPurchasedServers(hostnameMode?: boolean): string[]; +getPurchasedServers(): string[]; ``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| hostnameMode | boolean | Optional. Defaults to true. Returns hostnames if true, and IPs if false. | - Returns: string\[\] -Returns an array with either the hostnames or IPs of all of the servers you have purchased. +Returns an array with the hostnames of all of the servers you have purchased. ## Remarks diff --git a/markdown/bitburner.ns.getweakentime.md b/markdown/bitburner.ns.getweakentime.md index 1fe6e825d..8b0d8d911 100644 --- a/markdown/bitburner.ns.getweakentime.md +++ b/markdown/bitburner.ns.getweakentime.md @@ -22,7 +22,7 @@ getWeakenTime(host: string): number; number -Returns the amount of time in milliseconds it takes to execute the weaken Netscript function. Returns Infinity if called on a Hacknet Server. +Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server. ## Remarks diff --git a/markdown/bitburner.ns.hackanalyze.md b/markdown/bitburner.ns.hackanalyze.md index 20ac97c46..74d04c5f7 100644 --- a/markdown/bitburner.ns.hackanalyze.md +++ b/markdown/bitburner.ns.hackanalyze.md @@ -34,8 +34,8 @@ Returns the percentage of the specified server’s money you will steal with a s ```ts -//For example, assume the following returns 1: +//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% 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% of its total money. ``` diff --git a/markdown/bitburner.ns.md b/markdown/bitburner.ns.md index 48240f8c9..e24824de4 100644 --- a/markdown/bitburner.ns.md +++ b/markdown/bitburner.ns.md @@ -13,6 +13,20 @@ export interface NS extends Singularity ``` Extends: [Singularity](./bitburner.singularity.md) +## Remarks + +Basic ns1 usage example: + +``` +property.methodName; +``` +[ns1 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html)
Basic ns2 usage example: + +``` +ns.property.methodName; +``` +[ns2 in-game docs](https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html) + ## Properties | Property | Type | Description | @@ -61,7 +75,7 @@ export interface NS extends Singularity | [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(hostnameMode)](./bitburner.ns.getpurchasedservers.md) | Returns an array with either the hostnames or IPs of all of the servers you have purchased. | +| [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. | diff --git a/package-lock.json b/package-lock.json index 599d87693..2c4ccd75a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "bitburner", "version": "1.1.0", "hasInstallScript": true, "license": "SEE LICENSE IN license.txt", diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index b25183298..e5aff2a9d 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -3707,6 +3707,18 @@ interface Stanek { /** * Collection of all functions passed to scripts * @public + * @remarks + * Basic ns1 usage example: + * ``` + * property.methodName; + * ``` + * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs} + *
+ * Basic ns2 usage example: + * ``` + * ns.property.methodName; + * ``` + * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs} */ export interface NS extends Singularity { /**