mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
UI Improvements. Added two new Netscript functions to purchase Hacknet Nodes
This commit is contained in:
+4
-2
@@ -239,6 +239,7 @@ Reviver.constructors.Script = Script;
|
||||
//into worker scripts so that they will start running
|
||||
loadAllRunningScripts = function() {
|
||||
var count = 0;
|
||||
var total = 0;
|
||||
for (var property in AllServers) {
|
||||
if (AllServers.hasOwnProperty(property)) {
|
||||
var server = AllServers[property];
|
||||
@@ -254,10 +255,11 @@ loadAllRunningScripts = function() {
|
||||
addWorkerScript(script, server);
|
||||
|
||||
//Offline production
|
||||
scriptCalculateOfflineProduction(script);
|
||||
total += scriptCalculateOfflineProduction(script);
|
||||
}
|
||||
}
|
||||
}
|
||||
return total;
|
||||
console.log("Loaded " + count.toString() + " running scripts");
|
||||
}
|
||||
|
||||
@@ -305,7 +307,7 @@ scriptCalculateOfflineProduction = function(script) {
|
||||
script.offlineMoneyMade += totalOfflineProduction;
|
||||
script.offlineRunningTime += timePassed;
|
||||
script.offlineExpGained += expGain;
|
||||
|
||||
return totalOfflineProduction;
|
||||
//DEBUG
|
||||
var serverName = AllServers[script.server].hostname;
|
||||
console.log(script.filename + " from server " + serverName + " generated $" + totalOfflineProduction + " TOTAL while offline");
|
||||
|
||||
Reference in New Issue
Block a user