mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 10:12:53 +02:00
Trying to get the functionality to load all running scripts upon load to work
This commit is contained in:
@@ -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");
|
||||
}
|
||||
Reference in New Issue
Block a user