mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 20:55:44 +01:00
UI: Show BitNode multipliers in BN 5.1 (#1398)
This commit is contained in:
parent
f6de21ea18
commit
ceb58bc6b3
@ -28,9 +28,10 @@ function customFormatPercent(value: number): string {
|
||||
}
|
||||
|
||||
function BitNodeModifiedStats(props: IBitNodeModifiedStatsProps): React.ReactElement {
|
||||
// If player doesn't have SF5 or if the property isn't affected by BitNode mults
|
||||
if (props.mult === 1 || Player.sourceFileLvl(5) === 0)
|
||||
// If the player doesn't have access to SF5 feature or if the property isn't affected by BitNode mults
|
||||
if (props.mult === 1 || (Player.bitNodeN !== 5 && Player.sourceFileLvl(5) === 0)) {
|
||||
return <Typography color={props.color}>{customFormatPercent(props.base)}</Typography>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Typography color={props.color}>
|
||||
|
@ -229,8 +229,6 @@ export function CharacterStats(): React.ReactElement {
|
||||
}
|
||||
timeRows.push(["Total", convertTimeMsToTimeElapsedString(Player.totalPlaytime)]);
|
||||
|
||||
let showBitNodeMults = false;
|
||||
if (Player.sourceFileLvl(5) > 0) showBitNodeMults = true;
|
||||
return (
|
||||
<Container maxWidth="lg" disableGutters sx={{ mx: 0 }}>
|
||||
<Typography variant="h4">Stats</Typography>
|
||||
@ -592,7 +590,7 @@ export function CharacterStats(): React.ReactElement {
|
||||
|
||||
<CurrentBitNode />
|
||||
|
||||
{showBitNodeMults && (
|
||||
{(Player.bitNodeN === 5 || Player.sourceFileLvl(5) > 0) && (
|
||||
<Paper sx={{ p: 1, mb: 1 }}>
|
||||
<Typography variant="h5">BitNode Multipliers</Typography>
|
||||
<BitNodeMultipliersDisplay n={Player.bitNodeN} />
|
||||
|
Loading…
Reference in New Issue
Block a user