mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-30 09:57:32 +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,9 +60,10 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
|||||||
multiplier = Math.min(levelsToMax, purchaseMult as number);
|
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)
|
const base_increase =
|
||||||
- calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
|
calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult) -
|
||||||
const modded_increase = base_increase * (node.maxRam - node.ramUsed) / node.maxRam;
|
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);
|
const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);
|
||||||
upgradeLevelButton = (
|
upgradeLevelButton = (
|
||||||
@ -118,13 +119,7 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
|||||||
node.maxRam * Math.pow(2, multiplier),
|
node.maxRam * Math.pow(2, multiplier),
|
||||||
node.cores,
|
node.cores,
|
||||||
props.player.hacknet_node_money_mult,
|
props.player.hacknet_node_money_mult,
|
||||||
) - calculateHashGainRate(
|
) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
|
||||||
node.level,
|
|
||||||
0,
|
|
||||||
node.maxRam,
|
|
||||||
node.cores,
|
|
||||||
props.player.hacknet_node_money_mult,
|
|
||||||
);
|
|
||||||
|
|
||||||
const modded_increase =
|
const modded_increase =
|
||||||
calculateHashGainRate(
|
calculateHashGainRate(
|
||||||
@ -133,13 +128,8 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
|||||||
node.maxRam * Math.pow(2, multiplier),
|
node.maxRam * Math.pow(2, multiplier),
|
||||||
node.cores,
|
node.cores,
|
||||||
props.player.hacknet_node_money_mult,
|
props.player.hacknet_node_money_mult,
|
||||||
) - calculateHashGainRate(
|
) -
|
||||||
node.level,
|
calculateHashGainRate(node.level, node.ramUsed, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
|
||||||
node.ramUsed,
|
|
||||||
node.maxRam,
|
|
||||||
node.cores,
|
|
||||||
props.player.hacknet_node_money_mult,
|
|
||||||
);
|
|
||||||
|
|
||||||
const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);
|
const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);
|
||||||
upgradeRamButton = (
|
upgradeRamButton = (
|
||||||
@ -180,9 +170,10 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
|||||||
multiplier = Math.min(levelsToMax, purchaseMult as number);
|
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)
|
const base_increase =
|
||||||
- calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
|
calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult) -
|
||||||
const modded_increase = base_increase * (node.maxRam - node.ramUsed) / node.maxRam;
|
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);
|
const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);
|
||||||
upgradeCoresButton = (
|
upgradeCoresButton = (
|
||||||
@ -262,15 +253,19 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<Typography>
|
<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 />
|
<br />
|
||||||
<HashRate hashes={node.hashRate} /> current production rate.
|
<HashRate hashes={node.hashRate} /> current production rate.
|
||||||
<br />
|
<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 />
|
<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 />
|
<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>
|
</Typography>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user