mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 21:25:47 +01:00
Update HacknetServerElem.tsx
Run prettier. Run lint : no error. One warning about typescript versionning.
This commit is contained in:
parent
ceac0090cf
commit
4fa65322fe
@ -60,9 +60,9 @@ 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 + 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);
|
- calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
|
||||||
let modded_increase = base_increase * (node.maxRam - node.ramUsed) / node.maxRam;
|
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 = (
|
||||||
@ -125,8 +125,8 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
|||||||
node.cores,
|
node.cores,
|
||||||
props.player.hacknet_node_money_mult,
|
props.player.hacknet_node_money_mult,
|
||||||
);
|
);
|
||||||
|
|
||||||
let modded_increase =
|
const modded_increase =
|
||||||
calculateHashGainRate(
|
calculateHashGainRate(
|
||||||
node.level,
|
node.level,
|
||||||
node.ramUsed,
|
node.ramUsed,
|
||||||
@ -182,7 +182,7 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
|||||||
|
|
||||||
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 + multiplier, 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);
|
||||||
let modded_increase = base_increase * (node.maxRam - node.ramUsed) / node.maxRam;
|
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 = (
|
||||||
@ -270,11 +270,11 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
|||||||
<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>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
<Hashes hashes={node.totalHashesGenerated} /> (<HashRate hashes={node.hashRate} />)
|
<Hashes hashes={node.totalHashesGenerated} /> (<HashRate hashes={node.hashRate} />)
|
||||||
</Typography>
|
</Typography>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
Loading…
Reference in New Issue
Block a user