mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-19 15:54:09 +02:00
UI: Added new locale-aware and configurable number formatting (#354)
This commit is contained in:
@@ -31,7 +31,7 @@ import { TableCell } from "../../ui/React/Table";
|
||||
import TableBody from "@mui/material/TableBody";
|
||||
import Table from "@mui/material/Table";
|
||||
import TableRow from "@mui/material/TableRow";
|
||||
import { numeralWrapper } from "../../ui/numeralFormat";
|
||||
import { formatRam } from "../../ui/formatNumber";
|
||||
import { calculateHashGainRate } from "../formulas/HacknetServers";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
|
||||
@@ -273,10 +273,10 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
||||
</span>{" "}
|
||||
max production rate. (achieved when 100% RAM is allocated to it)
|
||||
<br />
|
||||
{numeralWrapper.formatRAM(node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} (
|
||||
{formatRam(node.ramUsed)} / {formatRam(node.maxRam)} (
|
||||
{Math.round((100 * node.ramUsed) / node.maxRam)}%) RAM allocated to script.
|
||||
<br />
|
||||
{numeralWrapper.formatRAM(node.maxRam - node.ramUsed)} / {numeralWrapper.formatRAM(node.maxRam)} (
|
||||
{formatRam(node.maxRam - node.ramUsed)} / {formatRam(node.maxRam)} (
|
||||
{Math.round((100 * (node.maxRam - node.ramUsed)) / node.maxRam)}%) RAM allocated to hash production.
|
||||
</Typography>
|
||||
}
|
||||
@@ -311,7 +311,7 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
|
||||
<Typography>RAM:</Typography>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Typography>{numeralWrapper.formatRAM(node.maxRam)}</Typography>
|
||||
<Typography>{formatRam(node.maxRam)}</Typography>
|
||||
</TableCell>
|
||||
<TableCell>{upgradeRamButton}</TableCell>
|
||||
</TableRow>
|
||||
|
||||
Reference in New Issue
Block a user