mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
UI: Added new locale-aware and configurable number formatting (#354)
This commit is contained in:
@@ -16,7 +16,7 @@ import { Script } from "../../Script/Script";
|
||||
import { TextFile } from "../../TextFile";
|
||||
import { calculateRamUsage, checkInfiniteLoop } from "../../Script/RamCalculations";
|
||||
import { RamCalculationErrorCode } from "../../Script/RamCalculationErrorCodes";
|
||||
import { numeralWrapper } from "../../ui/numeralFormat";
|
||||
import { formatRam } from "../../ui/formatNumber";
|
||||
import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
|
||||
import SearchIcon from "@mui/icons-material/Search";
|
||||
|
||||
@@ -256,10 +256,10 @@ export function Root(props: IProps): React.ReactElement {
|
||||
const entries = ramUsage.entries?.sort((a, b) => b.cost - a.cost) ?? [];
|
||||
const entriesDisp = [];
|
||||
for (const entry of entries) {
|
||||
entriesDisp.push([`${entry.name} (${entry.type})`, numeralWrapper.formatRAM(entry.cost)]);
|
||||
entriesDisp.push([`${entry.name} (${entry.type})`, formatRam(entry.cost)]);
|
||||
}
|
||||
|
||||
setRAM("RAM: " + numeralWrapper.formatRAM(ramUsage.cost));
|
||||
setRAM("RAM: " + formatRam(ramUsage.cost));
|
||||
setRamEntries(entriesDisp);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user