From db9c3193f70e9a7c9ae950f71b4cf9fa7dc970c7 Mon Sep 17 00:00:00 2001 From: "tyasuh.taeragan@gmail.com" Date: Thu, 14 Oct 2021 15:20:05 -0400 Subject: [PATCH] Commented Fixes --- .../netscript/singularityfunctions/upgradeHomeCores.rst | 2 +- src/NetscriptFunctions.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/netscript/singularityfunctions/upgradeHomeCores.rst b/doc/source/netscript/singularityfunctions/upgradeHomeCores.rst index cdaeeb4db..eb1a76c81 100644 --- a/doc/source/netscript/singularityfunctions/upgradeHomeCores.rst +++ b/doc/source/netscript/singularityfunctions/upgradeHomeCores.rst @@ -9,4 +9,4 @@ upgradeHomeRam() Netscript Function This function will upgrade amount of CORES on the player's home computer. The cost is the same as if you were to do it manually. - This function will return true if the player's home computer RAM is successfully upgraded, and false otherwise. + This function will return true if the player's home computer core count is successfully upgraded, and false otherwise. diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 00dd44b10..c53e7f071 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -3284,7 +3284,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS { // Check if we're at max CORES const homeComputer = Player.getHomeComputer(); if (homeComputer.cpuCores >=8) { - workerScript.log("upgradeHomeCores", `Your home computer is at max CORES.`); + workerScript.log("upgradeHomeCores", `Your home computer is at max cores.`); return false; } @@ -3294,13 +3294,13 @@ function NetscriptFunctions(workerScript: WorkerScript): NS { return false; } - homeComputer.cpuCores *= 2; + homeComputer.cpuCores +=1; Player.loseMoney(cost); Player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain); workerScript.log( "upgradeHomeCores", - `Purchased an additional core for home computer! It now has ${(homeComputer.cpuCores)} cores.`,); + `Purchased an additional core for home computer! It now has ${(homeComputer.cpuCores)} cores.`,); return true; }, getUpgradeHomeCoresCost: function (): any {