v0.28.4 - Bug fixes, getScriptIncome(), syntax highlighting for regular Netscript functions,

This commit is contained in:
danielyxie
2017-09-11 18:14:51 -05:00
parent 68fcc12ac8
commit 024546b4f1
12 changed files with 1060 additions and 889 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ HacknetNode.prototype.getLevelUpgradeCost = function(levels=1) {
HacknetNode.prototype.purchaseLevelUpgrade = function(levels=1) {
var cost = this.calculateLevelUpgradeCost(levels);
if (isNaN(cost)) {return false;}
if (isNaN(cost) || levels < 0) {return false;}
if (this.level + levels > CONSTANTS.HacknetNodeMaxLevel) {
var diff = Math.max(0, CONSTANTS.HacknetNodeMaxLevel - this.level);
return this.purchaseLevelUpgrade(diff);