mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 12:27:07 +02:00
UI: Added new locale-aware and configurable number formatting (#354)
This commit is contained in:
@@ -3,7 +3,7 @@ import { Box, Button, Container, Paper, Tooltip, Typography } from "@mui/materia
|
||||
import React from "react";
|
||||
import { Location } from "../../Locations/Location";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { numeralWrapper } from "../../ui/numeralFormat";
|
||||
import { formatNumberNoSuffix } from "../../ui/formatNumber";
|
||||
|
||||
interface IProps {
|
||||
Location: Location;
|
||||
@@ -74,7 +74,7 @@ export function Intro(props: IProps): React.ReactElement {
|
||||
}}
|
||||
>
|
||||
<b>Difficulty: </b>
|
||||
{numeralWrapper.format(props.Difficulty * 33.3333, "0")} / 100
|
||||
{formatNumberNoSuffix(props.Difficulty * 33.3333)} / 100
|
||||
{props.Difficulty > 1.5 && (
|
||||
<Tooltip
|
||||
title={
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Page } from "../../ui/Router";
|
||||
import { Player } from "@player";
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { Reputation } from "../../ui/React/Reputation";
|
||||
import { formatNumber } from "../../utils/StringHelperFunctions";
|
||||
import { formatNumberNoSuffix } from "../../ui/formatNumber";
|
||||
import {
|
||||
calculateInfiltratorsRepReward,
|
||||
calculateSellInformationCashReward,
|
||||
@@ -66,7 +66,7 @@ export function Victory(props: IProps): React.ReactElement {
|
||||
You{" "}
|
||||
{isMemberOfInfiltrators ? (
|
||||
<>
|
||||
have gained {formatNumber(infiltrationRepGain, 2)} rep for {FactionNames.ShadowsOfAnarchy} and{" "}
|
||||
have gained {formatNumberNoSuffix(infiltrationRepGain, 2)} rep for {FactionNames.ShadowsOfAnarchy} and{" "}
|
||||
</>
|
||||
) : (
|
||||
<></>
|
||||
|
||||
Reference in New Issue
Block a user