mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
UI: Added new locale-aware and configurable number formatting (#354)
This commit is contained in:
@@ -5,7 +5,7 @@ import { startWorkerScript } from "../../NetscriptWorker";
|
||||
import { RunningScript } from "../../Script/RunningScript";
|
||||
import { findRunningScript } from "../../Script/ScriptHelpers";
|
||||
import * as libarg from "arg";
|
||||
import { numeralWrapper } from "../../ui/numeralFormat";
|
||||
import { formatRam } from "../../ui/formatNumber";
|
||||
|
||||
export function runScript(commandArgs: (string | number | boolean)[], server: BaseServer): void {
|
||||
if (commandArgs.length < 1) {
|
||||
@@ -59,7 +59,7 @@ export function runScript(commandArgs: (string | number | boolean)[], server: Ba
|
||||
Terminal.error(
|
||||
"This machine does not have enough RAM to run this script" +
|
||||
(numThreads === 1 ? "" : ` with ${numThreads} threads`) +
|
||||
`. Script requires ${numeralWrapper.formatRAM(ramUsage)} of RAM`,
|
||||
`. Script requires ${formatRam(ramUsage)} of RAM`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user