From ceb58bc6b3b611b257f3299c21c40b75973f70bb Mon Sep 17 00:00:00 2001
From: catloversg <152669316+catloversg@users.noreply.github.com>
Date: Sun, 16 Jun 2024 06:35:32 +0700
Subject: [PATCH] UI: Show BitNode multipliers in BN 5.1 (#1398)
---
src/Augmentation/ui/PlayerMultipliers.tsx | 5 +++--
src/ui/CharacterStats.tsx | 4 +---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/Augmentation/ui/PlayerMultipliers.tsx b/src/Augmentation/ui/PlayerMultipliers.tsx
index e73a26422..792a3f6ec 100644
--- a/src/Augmentation/ui/PlayerMultipliers.tsx
+++ b/src/Augmentation/ui/PlayerMultipliers.tsx
@@ -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 {customFormatPercent(props.base)};
+ }
return (
diff --git a/src/ui/CharacterStats.tsx b/src/ui/CharacterStats.tsx
index b62e70b0e..8573de010 100644
--- a/src/ui/CharacterStats.tsx
+++ b/src/ui/CharacterStats.tsx
@@ -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 (
Stats
@@ -592,7 +590,7 @@ export function CharacterStats(): React.ReactElement {
- {showBitNodeMults && (
+ {(Player.bitNodeN === 5 || Player.sourceFileLvl(5) > 0) && (
BitNode Multipliers