Merged pull requests and fixed merge conflicts

This commit is contained in:
danielyxie
2018-06-08 11:19:22 -05:00
9 changed files with 481 additions and 512 deletions
+2 -18
View File
@@ -2510,15 +2510,7 @@ function NetscriptFunctions(workerScript) {
}
}
//Calculate how many times ram has been upgraded (doubled)
var currentRam = Player.getHomeComputer().maxRam;
var numUpgrades = Math.log2(currentRam);
//Calculate cost
//Have cost increase by some percentage each time RAM has been upgraded
var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome;
var mult = Math.pow(1.55, numUpgrades);
cost = cost * mult;
const cost = Player.getUpgradeHomeRamCost();
if (Player.money.lt(cost)) {
workerScript.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money");
@@ -2550,15 +2542,7 @@ function NetscriptFunctions(workerScript) {
}
}
//Calculate how many times ram has been upgraded (doubled)
var currentRam = Player.getHomeComputer().maxRam;
var numUpgrades = Math.log2(currentRam);
//Calculate cost
//Have cost increase by some percentage each time RAM has been upgraded
var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome;
var mult = Math.pow(1.55, numUpgrades);
return cost * mult;
return Player.getUpgradeHomeRamCost();
},
workForCompany : function() {
var ramCost = CONSTANTS.ScriptSingularityFn2RamCost;