diff --git a/css/popupboxes.css b/css/popupboxes.css index 61035e963..4cb5d64cd 100644 --- a/css/popupboxes.css +++ b/css/popupboxes.css @@ -12,20 +12,6 @@ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ } -/* -.dialog-box-container { - display: block; - position: relative; - z-index: 2; - margin: auto; - width: 50%; - height: 100%; - vertical-align: middle; - overflow: auto; - background-color: black; - background-color: rgba(0,0,0,0.4); -} -*/ .dialog-box-container { display: block; position: absolute; diff --git a/src/Constants.js b/src/Constants.js index b7dac29c7..844f48c32 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -18,7 +18,7 @@ CONSTANTS = { BaseCostForHacknetNodeCore: 500000, /* Hacknet Node constants */ - HacknetNodeMoneyGainPerLevel: 1.5, + HacknetNodeMoneyGainPerLevel: 1.6, HacknetNodePurchaseNextMult: 1.39, //Multiplier when purchasing an additional hacknet node HacknetNodeUpgradeLevelMult: 1.04, //Multiplier for cost when upgrading level HacknetNodeUpgradeRamMult: 1.26, //Multiplier for cost when upgrading RAM diff --git a/src/HacknetNode.js b/src/HacknetNode.js index 747ded83d..7ceabef55 100644 --- a/src/HacknetNode.js +++ b/src/HacknetNode.js @@ -49,7 +49,7 @@ HacknetNode.prototype.updateMoneyGainRate = function() { var gainPerLevel = CONSTANTS.HacknetNodeMoneyGainPerLevel; this.moneyGainRatePerSecond = (this.level * gainPerLevel) * - Math.pow(1.03, this.ram-1) * + Math.pow(1.035, this.ram-1) * ((this.numCores + 5) / 6) * Player.hacknet_node_money_mult; if (isNaN(this.moneyGainRatePerSecond)) { this.moneyGainRatePerSecond = 0; diff --git a/src/NetscriptWorker.js b/src/NetscriptWorker.js index 8560f3030..b7b786623 100644 --- a/src/NetscriptWorker.js +++ b/src/NetscriptWorker.js @@ -33,7 +33,7 @@ function runScriptsLoop() { var ast = Parser(Tokenizer(InputStream(workerScripts[i].code))); //console.log(ast); } catch (e) { - dialogBoxCreate("Syntax ERROR in " + workerScripts[i].name + ":", e, "", ""); + dialogBoxCreate("Syntax ERROR in " + workerScripts[i].name + ":
" + e); workerScripts[i].env.stopFlag = true; continue; } diff --git a/src/Script.js b/src/Script.js index d79e853bb..26ae7fb12 100644 --- a/src/Script.js +++ b/src/Script.js @@ -406,7 +406,7 @@ scriptCalculateOfflineProduction = function(script) { if (serv == null) {continue;} var timesHacked = Math.round(0.5 * script.numTimesHackMap[ip] / script.onlineRunningTime * timePassed); console.log(script.filename + " hacked " + serv.hostname + " " + timesHacked + " times while offline"); - script.log(script.filename + " hacked " + serv.hostname + " " + timesHacked + " times while offline"); + script.log("Hacked " + serv.hostname + " " + timesHacked + " times while offline"); serv.fortify(CONSTANTS.ServerFortifyAmount * timesHacked); } } @@ -419,7 +419,7 @@ scriptCalculateOfflineProduction = function(script) { if (serv == null) {continue;} var timesWeakened = Math.round(0.5 * script.numTimesWeakenMap[ip] / script.onlineRunningTime * timePassed); console.log(script.filename + " called weaken() on " + serv.hostname + " " + timesWeakened + " times while offline"); - script.log(script.filename + " called weaken() on " + serv.hostname + " " + timesWeakened + " times while offline"); + script.log("Called weaken() on " + serv.hostname + " " + timesWeakened + " times while offline"); serv.weaken(CONSTANTS.ServerWeakenAmount * timesWeakened); } } @@ -432,12 +432,12 @@ scriptCalculateOfflineProduction = function(script) { if (serv == null) {continue;} var timesGrown = Math.round(0.5 * script.numTimesGrowMap[ip] / script.onlineRunningTime * timePassed); console.log(script.filename + " called grow() on " + serv.hostname + " " + timesGrown + " times while offline"); - script.log(script.filename + " called grow() on " + serv.hostname + " " + timesGrown + " times while offline"); - //TODO + script.log("Called grow() on " + serv.hostname + " " + timesGrown + " times while offline"); + var growth = processSingleServerGrowth(serv, timesGrown * 450); + script.log(serv.hostname + " grown by " + formatNumber(growth * 100 - 100, 6) + "% from grow() calls made while offline"); } } - return totalOfflineProduction; } diff --git a/src/Server.js b/src/Server.js index 35922c3f4..780212254 100644 --- a/src/Server.js +++ b/src/Server.js @@ -22,6 +22,7 @@ function Server() { this.scripts = []; this.runningScripts = []; //Names (and only names) of scripts being run this.programs = []; + this.messages = []; /* Hacking information (only valid for "foreign" aka non-purchased servers) */