From 98a04e49324b76dfefd15ee1ad68dcb24fd1169b Mon Sep 17 00:00:00 2001 From: danielyxie Date: Sat, 13 Apr 2019 00:33:30 -0700 Subject: [PATCH] Fix Terminal wget bug. Issue #593 --- src/Constants.ts | 2 ++ src/NetscriptFunctions.js | 10 +++++++++- src/Terminal.js | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Constants.ts b/src/Constants.ts index a655005c6..7ed43ab13 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -279,5 +279,7 @@ export let CONSTANTS: IMap = { * Gang changes: ** Bug Fix: Gangs can no longer clash with themselve ** Bug Fix: Winning against another gang should properly reduce their power + + * Bug Fix: Terminal 'wget' command now works properly ` } diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 54a858bc6..ac72e1f1c 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -5156,7 +5156,15 @@ function NetscriptFunctions(workerScript) { return Player.sleeves[sleeveNumber].tryBuyAugmentation(Player, aug); } - } // End sleeve + }, // End sleeve + heart: { + // Easter egg function + break : function() { + if (workerScript.checkingRam) { return 0; } + + return Player.karma; + } + } } // End return } // End NetscriptFunction() diff --git a/src/Terminal.js b/src/Terminal.js index 9514b48a5..3047c2778 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -1474,7 +1474,7 @@ let Terminal = { } let url = commandArray[1]; - let target = comanndArray[2]; + let target = commandArray[2]; if (!isScriptFilename(target) && !target.endsWith(".txt")) { return post(`wget failed: Invalid target file. Target file must be script or text file`); }