From 1dcae1aeec751d87afd493f9b61b2a979576f557 Mon Sep 17 00:00:00 2001 From: lethern Date: Tue, 18 Jan 2022 16:15:40 +0100 Subject: [PATCH] Update NetscriptDefinitions.d.ts grow/weaken/hack: removed threads part from example - confuses newbies --- src/ScriptEditor/NetscriptDefinitions.d.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 16a778fc5..4a566a6c7 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -4196,13 +4196,11 @@ export interface NS extends Singularity { * ```ts * // NS1: * var earnedMoney = hack("foodnstuff"); - * earnedMoney = earnedMoney + hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack * ``` * @example * ```ts * // NS2: * 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 opts - Optional parameters for configuring function behavior. @@ -4230,16 +4228,14 @@ export interface NS extends Singularity { * @example * ```ts * // NS1: - * var availableMoney = getServerMoneyAvailable("foodnstuff"); + * var currentMoney = getServerMoneyAvailable("foodnstuff"); * currentMoney = currentMoney * (1 + grow("foodnstuff")); - * currentMoney = currentMoney * (1 + grow("foodnstuff", { threads: 5 })); // Only use 5 threads to grow * ``` * @example * ```ts * // NS2: - * let availableMoney = ns.getServerMoneyAvailable("foodnstuff"); + * let currentMoney = ns.getServerMoneyAvailable("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 opts - Optional parameters for configuring function behavior. @@ -4265,14 +4261,12 @@ export interface NS extends Singularity { * // NS1: * var currentSecurity = getServerSecurityLevel("foodnstuff"); * currentSecurity = currentSecurity - weaken("foodnstuff"); - * currentSecurity = currentSecurity - weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken * ``` * @example * ```ts * // NS2: * let currentSecurity = ns.getServerSecurityLevel("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 opts - Optional parameters for configuring function behavior.