MISC: move server constants into their own constant (#1075)

This commit is contained in:
Caldwell
2024-02-10 10:13:42 +01:00
committed by GitHub
parent fd5b0f8241
commit 4d551915b3
13 changed files with 56 additions and 48 deletions
@@ -1,5 +1,5 @@
// Server and HacknetServer-related methods for the Player class (PlayerObject)
import { CONSTANTS } from "../../Constants";
import { ServerConstants } from "../../Server/data/Constants";
import { currentNodeMults } from "../../BitNode/BitNodeMultipliers";
import { Server } from "../../Server/Server";
@@ -35,7 +35,7 @@ export function getUpgradeHomeRamCost(this: PlayerObject): number {
//Calculate cost
//Have cost increase by some percentage each time RAM has been upgraded
const mult = Math.pow(1.58, numUpgrades);
const cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * currentNodeMults.HomeComputerRamCost;
const cost = currentRam * ServerConstants.BaseCostFor1GBOfRamHome * mult * currentNodeMults.HomeComputerRamCost;
return cost;
}