mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +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 {
|
function BitNodeModifiedStats(props: IBitNodeModifiedStatsProps): React.ReactElement {
|
||||||
// If player doesn't have SF5 or if the property isn't affected by BitNode mults
|
// 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.sourceFileLvl(5) === 0)
|
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}>{customFormatPercent(props.base)}</Typography>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Typography color={props.color}>
|
<Typography color={props.color}>
|
||||||
|
@ -229,8 +229,6 @@ export function CharacterStats(): React.ReactElement {
|
|||||||
}
|
}
|
||||||
timeRows.push(["Total", convertTimeMsToTimeElapsedString(Player.totalPlaytime)]);
|
timeRows.push(["Total", convertTimeMsToTimeElapsedString(Player.totalPlaytime)]);
|
||||||
|
|
||||||
let showBitNodeMults = false;
|
|
||||||
if (Player.sourceFileLvl(5) > 0) showBitNodeMults = true;
|
|
||||||
return (
|
return (
|
||||||
<Container maxWidth="lg" disableGutters sx={{ mx: 0 }}>
|
<Container maxWidth="lg" disableGutters sx={{ mx: 0 }}>
|
||||||
<Typography variant="h4">Stats</Typography>
|
<Typography variant="h4">Stats</Typography>
|
||||||
@ -592,7 +590,7 @@ export function CharacterStats(): React.ReactElement {
|
|||||||
|
|
||||||
<CurrentBitNode />
|
<CurrentBitNode />
|
||||||
|
|
||||||
{showBitNodeMults && (
|
{(Player.bitNodeN === 5 || Player.sourceFileLvl(5) > 0) && (
|
||||||
<Paper sx={{ p: 1, mb: 1 }}>
|
<Paper sx={{ p: 1, mb: 1 }}>
|
||||||
<Typography variant="h5">BitNode Multipliers</Typography>
|
<Typography variant="h5">BitNode Multipliers</Typography>
|
||||||
<BitNodeMultipliersDisplay n={Player.bitNodeN} />
|
<BitNodeMultipliersDisplay n={Player.bitNodeN} />
|
||||||
|
Loading…
Reference in New Issue
Block a user