From c44bdc1018bd6eadd4fc2574ec77b449329cc860 Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Wed, 12 Apr 2023 21:05:53 -0400 Subject: [PATCH] Remove unreachable code --- src/NetscriptFunctions.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index f19b9f8dc..50b4a5fc0 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -1014,26 +1014,6 @@ export const ns: InternalAPI = { requiredHackingSkill: server.requiredHackingSkill, serverGrowth: server.serverGrowth, }; - - const copy = Object.assign({}, server) as Server; - // These fields should be hidden. - copy.contracts = []; - copy.messages = []; - copy.runningScripts = []; - copy.scripts = []; - copy.textFiles = []; - copy.programs = []; - copy.serversOnNetwork = []; - if (!copy.baseDifficulty) copy.baseDifficulty = 0; - if (!copy.hackDifficulty) copy.hackDifficulty = 0; - if (!copy.minDifficulty) copy.minDifficulty = 0; - if (!copy.moneyAvailable) copy.moneyAvailable = 0; - if (!copy.moneyMax) copy.moneyMax = 0; - if (!copy.numOpenPortsRequired) copy.numOpenPortsRequired = 0; - if (!copy.openPortCount) copy.openPortCount = 0; - if (!copy.requiredHackingSkill) copy.requiredHackingSkill = 0; - if (!copy.serverGrowth) copy.serverGrowth = 0; - return copy; }, getServerMoneyAvailable: (ctx) => (_hostname) => { const hostname = helpers.string(ctx, "hostname", _hostname);