diff --git a/src/Hacknet/ui/HacknetServerElem.tsx b/src/Hacknet/ui/HacknetServerElem.tsx index b9a9d8f97..ee1986599 100644 --- a/src/Hacknet/ui/HacknetServerElem.tsx +++ b/src/Hacknet/ui/HacknetServerElem.tsx @@ -60,15 +60,22 @@ export function HacknetServerElem(props: IProps): React.ReactElement { multiplier = Math.min(levelsToMax, purchaseMult as number); } - const increase = + const base_increase = calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult) - - node.hashRate; + calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult); + const modded_increase = (base_increase * (node.maxRam - node.ramUsed)) / node.maxRam; + const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult); upgradeLevelButton = ( - + + + (effective increase, taking current RAM usage into account) +
+ + + + {" "} + (base increase, attained when no script is running) } > @@ -109,20 +116,36 @@ export function HacknetServerElem(props: IProps): React.ReactElement { multiplier = Math.min(levelsToMax, purchaseMult as number); } - const increase = + const base_increase = calculateHashGainRate( node.level, 0, node.maxRam * Math.pow(2, multiplier), node.cores, props.player.hacknet_node_money_mult, - ) - node.hashRate; + ) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult); + + const modded_increase = + calculateHashGainRate( + node.level, + node.ramUsed, + node.maxRam * Math.pow(2, multiplier), + node.cores, + props.player.hacknet_node_money_mult, + ) - + calculateHashGainRate(node.level, node.ramUsed, node.maxRam, node.cores, props.player.hacknet_node_money_mult); + const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult); upgradeRamButton = ( - + + + (effective increase, taking current RAM usage into account) +
+ + + + {" "} + (base increase, attained when no script is running) } > @@ -155,15 +178,22 @@ export function HacknetServerElem(props: IProps): React.ReactElement { multiplier = Math.min(levelsToMax, purchaseMult as number); } - const increase = + const base_increase = calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult) - - node.hashRate; + calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult); + const modded_increase = (base_increase * (node.maxRam - node.ramUsed)) / node.maxRam; + const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult); upgradeCoresButton = ( - + + + (effective increase, taking current RAM usage into account) +
+ + + + {" "} + (base increase, attained when no script is running) } > @@ -232,9 +262,31 @@ export function HacknetServerElem(props: IProps): React.ReactElement { Production: - - () - + + hashes produced by this server since last augment + installation. +
+ current production rate. +
+ + + {" "} + max production rate. (achieved when 100% RAM is allocated to it) +
+ {numeralWrapper.formatRAM(node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} ( + {Math.round((100 * node.ramUsed) / node.maxRam)}%) RAM allocated to script. +
+ {numeralWrapper.formatRAM(node.maxRam - node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} ( + {Math.round((100 * (node.maxRam - node.ramUsed)) / node.maxRam)}%) RAM allocated to hash production. + + } + > + + () + +