mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 21:25:47 +01:00
Update HacknetServerElem.tsx
Actually ran prettier this time. Apparently fixed my lint install : no error, no warning.
This commit is contained in:
parent
4fa65322fe
commit
a7045a2343
@ -60,17 +60,18 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
||||
multiplier = Math.min(levelsToMax, purchaseMult as number);
|
||||
}
|
||||
|
||||
const base_increase = calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult)
|
||||
- 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 base_increase =
|
||||
calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult) -
|
||||
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 = (
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
+<HashRate hashes={base_increase} /> (base increase, attained when no script is running) <br />
|
||||
+<HashRate hashes={modded_increase} /> (effective increase, taking current RAM usage into account)
|
||||
+<HashRate hashes={base_increase} /> (base increase, attained when no script is running) <br />
|
||||
+<HashRate hashes={modded_increase} /> (effective increase, taking current RAM usage into account)
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
@ -118,28 +119,17 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
||||
node.maxRam * Math.pow(2, multiplier),
|
||||
node.cores,
|
||||
props.player.hacknet_node_money_mult,
|
||||
) - calculateHashGainRate(
|
||||
node.level,
|
||||
0,
|
||||
node.maxRam,
|
||||
node.cores,
|
||||
props.player.hacknet_node_money_mult,
|
||||
);
|
||||
) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
|
||||
|
||||
const modded_increase =
|
||||
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,
|
||||
);
|
||||
) -
|
||||
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 = (
|
||||
@ -180,9 +170,10 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
||||
multiplier = Math.min(levelsToMax, purchaseMult as number);
|
||||
}
|
||||
|
||||
const base_increase = calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult)
|
||||
- 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 base_increase =
|
||||
calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult) -
|
||||
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 = (
|
||||
@ -262,15 +253,19 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
<Hashes hashes={node.totalHashesGenerated} /> hashes producted by this server since last augment installation.
|
||||
<Hashes hashes={node.totalHashesGenerated} /> hashes producted by this server since last augment
|
||||
installation.
|
||||
<br />
|
||||
<HashRate hashes={node.hashRate} /> current production rate.
|
||||
<br />
|
||||
<HashRate hashes={node.hashRate * node.maxRam / (node.maxRam - node.ramUsed)} /> max production rate. (achieved when 100% Ram is allocated to it)
|
||||
<HashRate hashes={(node.hashRate * node.maxRam) / (node.maxRam - node.ramUsed)} /> max production
|
||||
rate. (achieved when 100% Ram is allocated to it)
|
||||
<br />
|
||||
{numeralWrapper.formatRAM(node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} ({Math.round(100 * node.ramUsed / node.maxRam)}%) Ram allocated to script.
|
||||
{numeralWrapper.formatRAM(node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} (
|
||||
{Math.round((100 * node.ramUsed) / node.maxRam)}%) Ram allocated to script.
|
||||
<br />
|
||||
{numeralWrapper.formatRAM(node.maxRam - node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} ({Math.round(100 * (node.maxRam - node.ramUsed) / node.maxRam)}%) Ram allocated to hash production.
|
||||
{numeralWrapper.formatRAM(node.maxRam - node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} (
|
||||
{Math.round((100 * (node.maxRam - node.ramUsed)) / node.maxRam)}%) Ram allocated to hash production.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user