diff --git a/README.md b/README.md index 3e23bb695..8e016b850 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ TESTING TODO: If a server has no more money available it cannot be hacked anymore Should work automatically...because your money gained percentage will be multiplied by 0 When the game is loaded re-load all of the scripts in runningScripts + - Does not seem to work. Although the addWorkerScript() function itself seems to work + - LOoks like its because AllServer is an object, so AllServers.length does not work. Have + to make a custom AllServers.size() function or something oogle it im too tired right now Tasks TODO: Script offline progress If a script has bad syntax...it fucks everything up when you try to run it so fix that diff --git a/index.html b/index.html index 124332ea5..4d67dda07 100644 --- a/index.html +++ b/index.html @@ -25,12 +25,12 @@ + - diff --git a/src/Netscript/NetscriptWorker.js b/src/Netscript/NetscriptWorker.js index 7e2e9b2e6..3e4c6e0e9 100644 --- a/src/Netscript/NetscriptWorker.js +++ b/src/Netscript/NetscriptWorker.js @@ -98,7 +98,6 @@ function addWorkerScript(script, server) { s.serverIp = server.ip; workerScripts.push(s); console.log("Pushed script onto workerScripts"); - } runScriptsLoop(); \ No newline at end of file diff --git a/src/Script.js b/src/Script.js index ec88fd77b..da05b5e98 100644 --- a/src/Script.js +++ b/src/Script.js @@ -130,10 +130,15 @@ Reviver.constructors.Script = Script; //Called when the game is loaded. Loads all running scripts (from all servers) //into worker scripts so that they will start running function loadAllRunningScripts() { + var count = 0; + console.log("AllServers.length: " + AllServers.length); for (var i = 0; i < AllServers.length; i++) { var server = AllServers[i]; + console.log("Loading scripts from server " + server.hostname); for (var j = 0; j < server.runningScripts.length; j++) { + count++; addWorkerScript(server.runningScripts[j], server); } } + console.log("Loaded " + count.toString() + " running scripts"); } \ No newline at end of file diff --git a/src/engine.js b/src/engine.js index 71fa6ed35..237db5e24 100644 --- a/src/engine.js +++ b/src/engine.js @@ -297,7 +297,6 @@ var Engine = { //Character info Engine.Display.characterInfo = document.getElementById("character-info"); - //Engine.displayCharacterInfo(); - Don't think I need this //Script editor Engine.Display.scriptEditorText = document.getElementById("script-editor-text");