adding int stat to sleeve overview and more stats overview (#1030)

This commit is contained in:
Caldwell 2024-01-14 22:34:48 +01:00 committed by GitHub
parent c5ca30d796
commit 2ac0470cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

@ -1,4 +1,5 @@
import { Sleeve } from "../Sleeve";
import { Player } from "@player";
import { formatExp, formatPercent } from "../../../ui/formatNumber";
import { convertTimeMsToTimeElapsedString } from "../../../utils/StringHelperFunctions";
import { CONSTANTS } from "../../../Constants";
@ -28,6 +29,16 @@ export function MoreStatsModal(props: IProps): React.ReactElement {
],
[<>Agility:&nbsp;</>, props.sleeve.skills.agility, <>&nbsp;({formatExp(props.sleeve.exp.agility)} exp)</>],
[<>Charisma:&nbsp;</>, props.sleeve.skills.charisma, <>&nbsp;({formatExp(props.sleeve.exp.charisma)} exp)</>],
[
...(Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5
? [
<>Intelligence:&nbsp;</>,
props.sleeve.skills.intelligence,
<>&nbsp;({formatExp(props.sleeve.exp.intelligence)} exp)</>,
]
: [<></>]),
],
[<></>],
]}
title="Stats:"
/>

@ -76,6 +76,13 @@ export function StatsElement(props: IProps): React.ReactElement {
color={Settings.theme.cha}
data={{ level: props.sleeve.skills.charisma, exp: props.sleeve.exp.charisma }}
/>
{(Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) && (
<StatsRow
name="Intelligence"
color={Settings.theme.int}
data={{ level: props.sleeve.skills.intelligence, exp: props.sleeve.exp.intelligence }}
/>
)}
<TableRow>
<TableCell classes={{ root: classes.cellNone }}>
<br />