From 75ce3f234612706fa44eadf5bde8ebef21ce4a0c Mon Sep 17 00:00:00 2001 From: nickofolas Date: Tue, 19 Apr 2022 09:57:26 -0500 Subject: [PATCH] Use same BN level logic as save name generator --- src/ui/CharacterStats.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ui/CharacterStats.tsx b/src/ui/CharacterStats.tsx index 43df51bcd..abc7e6a08 100644 --- a/src/ui/CharacterStats.tsx +++ b/src/ui/CharacterStats.tsx @@ -82,13 +82,12 @@ function CurrentBitNode(): React.ReactElement { const player = use.Player(); if (player.sourceFiles.length > 0) { const index = "BitNode" + player.bitNodeN; - const currentSourceFile = player.sourceFiles.find((sourceFile) => sourceFile.n == player.bitNodeN); - const lvl = currentSourceFile ? currentSourceFile.lvl : 0; + const lvl = player.sourceFileLvl(player.bitNodeN) + 1; return ( - BitNode {player.bitNodeN}: {BitNodes[index].name} (Level {lvl + 1}) + BitNode {player.bitNodeN}: {BitNodes[index].name} (Level {lvl}) {BitNodes[index].info}