mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-07 11:04:36 +01:00
UI: Fix misleading favor numbers (#1530)
This commit is contained in:
@ -207,7 +207,7 @@ export function AugmentationsPage({ faction }: { faction: Faction }): React.Reac
|
||||
<Typography>
|
||||
<b>Reputation:</b> <Reputation reputation={faction.playerReputation} />
|
||||
<br />
|
||||
<b>Favor:</b> <Favor favor={Math.floor(faction.favor)} />
|
||||
<b>Favor:</b> <Favor favor={faction.favor} />
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box sx={{ display: "grid", gridTemplateColumns: "repeat(4, 1fr)" }}>
|
||||
|
@ -193,9 +193,7 @@ const FactionElement = (props: FactionElementProps): React.ReactElement => {
|
||||
|
||||
{props.faction.isMember && (
|
||||
<Box display="grid" sx={{ alignItems: "center", justifyItems: "left", gridAutoFlow: "row" }}>
|
||||
<Typography sx={{ color: Settings.theme.rep }}>
|
||||
{formatFavor(Math.floor(props.faction.favor))} favor
|
||||
</Typography>
|
||||
<Typography sx={{ color: Settings.theme.rep }}>{formatFavor(props.faction.favor)} favor</Typography>
|
||||
<Typography sx={{ color: Settings.theme.rep }}>
|
||||
{formatReputation(props.faction.playerReputation)} rep
|
||||
</Typography>
|
||||
|
@ -91,7 +91,7 @@ export function Info(props: IProps): React.ReactElement {
|
||||
}
|
||||
>
|
||||
<Typography>
|
||||
Faction Favor: <Favor favor={Math.floor(props.faction.favor)} />
|
||||
Faction Favor: <Favor favor={props.faction.favor} />
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
|
@ -143,7 +143,7 @@ export function formatNumber(n: number, fractionalDigits = 3, suffixStart = 1000
|
||||
export const formatNumberNoSuffix = (n: number, fractionalDigits = 0) => {
|
||||
return formatNumber(n, fractionalDigits, 1e33);
|
||||
};
|
||||
export const formatFavor = formatNumberNoSuffix;
|
||||
export const formatFavor = (n: number) => formatNumberNoSuffix(n, 3);
|
||||
|
||||
/** Standard noninteger formatting with no options set. Collapses to suffix at 1000 and shows 3 fractional digits. */
|
||||
export const formatBigNumber = (n: number) => formatNumber(n);
|
||||
|
Reference in New Issue
Block a user