mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
temp changes
This commit is contained in:
+7
-4
@@ -423,12 +423,15 @@ RunningScript.fromJSON = function(value) {
|
||||
}
|
||||
|
||||
//Creates an object that creates a map/dictionary with the IP of each existing server as
|
||||
//a key, and 0 as the value. This is used to keep track of how much money a script
|
||||
//hacks from that server
|
||||
function AllServersMap() {
|
||||
//a key. Initializes every key with a specified value that can either by a number or an array
|
||||
function AllServersMap(init = 0) {
|
||||
if (init.constructor === Array || init instanceof Array) {
|
||||
this.initValue = init.splice();
|
||||
}
|
||||
|
||||
for (var ip in AllServers) {
|
||||
if (AllServers.hasOwnProperty(ip)) {
|
||||
this[ip] = 0;
|
||||
this[ip] = init;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user