mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
Fixed issue with Hacknet Node multipliers. Added total production cost display for Active Scripts
This commit is contained in:
+4
-4
@@ -77,9 +77,8 @@ HacknetNode.prototype.purchaseLevelUpgrade = function(levels=1) {
|
||||
if (cost > Player.money) {return false;}
|
||||
Player.loseMoney(cost);
|
||||
if (this.level + levels >= CONSTANTS.HacknetNodeMaxLevel) {
|
||||
this.level = CONSTANTS.HacknetNodeMaxLevel;
|
||||
this.updateMoneyGainRate();
|
||||
return true;
|
||||
var diff = Math.max(0, CONSTANTS.HacknetNodeMaxLevel - this.level);
|
||||
return this.purchaseLevelUpgrade(diff);
|
||||
}
|
||||
this.level += levels;
|
||||
this.updateMoneyGainRate();
|
||||
@@ -373,7 +372,8 @@ updateHacknetNodeDomElement = function(nodeObj) {
|
||||
//Max
|
||||
multiplier = getMaxNumberLevelUpgrades(nodeObj);
|
||||
} else {
|
||||
multiplier = hacknetNodePurchaseMultiplier;
|
||||
var levelsToMax = CONSTANTS.HacknetNodeMaxLevel - nodeObj.level;
|
||||
multiplier = Math.min(levelsToMax, hacknetNodePurchaseMultiplier);
|
||||
}
|
||||
|
||||
var upgradeLevelCost = nodeObj.calculateLevelUpgradeCost(multiplier);
|
||||
|
||||
Reference in New Issue
Block a user