From 2dfaca3db48050ad45ab450b007e158c936eb32e Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Sun, 16 Feb 2025 15:58:00 +0700 Subject: [PATCH] DOCUMENTATION: Clarify ns.nuke (#1969) --- markdown/bitburner.ns.nuke.md | 4 ++++ src/ScriptEditor/NetscriptDefinitions.d.ts | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/markdown/bitburner.ns.nuke.md b/markdown/bitburner.ns.nuke.md index cc1eec236..6bffa4960 100644 --- a/markdown/bitburner.ns.nuke.md +++ b/markdown/bitburner.ns.nuke.md @@ -30,6 +30,10 @@ RAM cost: 0.05 GB Running NUKE.exe on a target server gives you root access which means you can execute scripts on said server. NUKE.exe must exist on your home computer. +Each server has a different number of required open ports. If that number is greater than 0, you have to open its ports before nuking it. You can check the requirement with [getServerNumPortsRequired](./bitburner.ns.getservernumportsrequired.md) or [getServer().numOpenPortsRequired](./bitburner.server.numopenportsrequired.md). + +Note that the server's required hacking level is not a requirement of nuking. You can nuke a server as long as you open enough ports, regardless of your hacking level. + ## Example diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 0c8465348..84392dabc 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -6744,7 +6744,16 @@ export interface NS { * @remarks * RAM cost: 0.05 GB * - * Running NUKE.exe on a target server gives you root access which means you can execute scripts on said server. NUKE.exe must exist on your home computer. + * Running NUKE.exe on a target server gives you root access which means you can execute scripts on said server. + * NUKE.exe must exist on your home computer. + * + * Each server has a different number of required open ports. If that number is greater than 0, you have to open its + * ports before nuking it. + * You can check the requirement with {@link NS.getServerNumPortsRequired | getServerNumPortsRequired} or + * {@link Server.numOpenPortsRequired | getServer().numOpenPortsRequired}. + * + * Note that the server's required hacking level is not a requirement of nuking. You can nuke a server as long as you + * open enough ports, regardless of your hacking level. * * @example * ```js