mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Update NetscriptDefinitions.d.ts
grow/weaken/hack: removed threads part from example - confuses newbies
This commit is contained in:
parent
bb6c2cd79e
commit
1dcae1aeec
10
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
10
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -4196,13 +4196,11 @@ export interface NS extends Singularity {
|
|||||||
* ```ts
|
* ```ts
|
||||||
* // NS1:
|
* // NS1:
|
||||||
* var earnedMoney = hack("foodnstuff");
|
* var earnedMoney = hack("foodnstuff");
|
||||||
* earnedMoney = earnedMoney + hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack
|
|
||||||
* ```
|
* ```
|
||||||
* @example
|
* @example
|
||||||
* ```ts
|
* ```ts
|
||||||
* // NS2:
|
* // NS2:
|
||||||
* let earnedMoney = await ns.hack("foodnstuff");
|
* let earnedMoney = await ns.hack("foodnstuff");
|
||||||
* earnedMoney += await ns.hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack
|
|
||||||
* ```
|
* ```
|
||||||
* @param host - Hostname of the target server to hack.
|
* @param host - Hostname of the target server to hack.
|
||||||
* @param opts - Optional parameters for configuring function behavior.
|
* @param opts - Optional parameters for configuring function behavior.
|
||||||
@ -4230,16 +4228,14 @@ export interface NS extends Singularity {
|
|||||||
* @example
|
* @example
|
||||||
* ```ts
|
* ```ts
|
||||||
* // NS1:
|
* // NS1:
|
||||||
* var availableMoney = getServerMoneyAvailable("foodnstuff");
|
* var currentMoney = getServerMoneyAvailable("foodnstuff");
|
||||||
* currentMoney = currentMoney * (1 + grow("foodnstuff"));
|
* currentMoney = currentMoney * (1 + grow("foodnstuff"));
|
||||||
* currentMoney = currentMoney * (1 + grow("foodnstuff", { threads: 5 })); // Only use 5 threads to grow
|
|
||||||
* ```
|
* ```
|
||||||
* @example
|
* @example
|
||||||
* ```ts
|
* ```ts
|
||||||
* // NS2:
|
* // NS2:
|
||||||
* let availableMoney = ns.getServerMoneyAvailable("foodnstuff");
|
* let currentMoney = ns.getServerMoneyAvailable("foodnstuff");
|
||||||
* currentMoney *= (1 + await ns.grow("foodnstuff"));
|
* currentMoney *= (1 + await ns.grow("foodnstuff"));
|
||||||
* currentMoney *= (1 + await ns.grow("foodnstuff", { threads: 5 })); // Only use 5 threads to grow
|
|
||||||
* ```
|
* ```
|
||||||
* @param host - Hostname of the target server to grow.
|
* @param host - Hostname of the target server to grow.
|
||||||
* @param opts - Optional parameters for configuring function behavior.
|
* @param opts - Optional parameters for configuring function behavior.
|
||||||
@ -4265,14 +4261,12 @@ export interface NS extends Singularity {
|
|||||||
* // NS1:
|
* // NS1:
|
||||||
* var currentSecurity = getServerSecurityLevel("foodnstuff");
|
* var currentSecurity = getServerSecurityLevel("foodnstuff");
|
||||||
* currentSecurity = currentSecurity - weaken("foodnstuff");
|
* currentSecurity = currentSecurity - weaken("foodnstuff");
|
||||||
* currentSecurity = currentSecurity - weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken
|
|
||||||
* ```
|
* ```
|
||||||
* @example
|
* @example
|
||||||
* ```ts
|
* ```ts
|
||||||
* // NS2:
|
* // NS2:
|
||||||
* let currentSecurity = ns.getServerSecurityLevel("foodnstuff");
|
* let currentSecurity = ns.getServerSecurityLevel("foodnstuff");
|
||||||
* currentSecurity -= await ns.weaken("foodnstuff");
|
* currentSecurity -= await ns.weaken("foodnstuff");
|
||||||
* currentSecurity -= await ns.weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken
|
|
||||||
* ```
|
* ```
|
||||||
* @param host - Hostname of the target server to weaken.
|
* @param host - Hostname of the target server to weaken.
|
||||||
* @param opts - Optional parameters for configuring function behavior.
|
* @param opts - Optional parameters for configuring function behavior.
|
||||||
|
Loading…
Reference in New Issue
Block a user