From 4ec14460b6560f0b3d62e4858e0d9a9f006f463b Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Mon, 17 May 2021 17:49:39 -0400 Subject: [PATCH] more fixes --- src/Constants.ts | 6 ++++++ src/Faction/FactionHelpers.jsx | 6 +++++- src/NetscriptFunctions.js | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Constants.ts b/src/Constants.ts index 847112d92..95b2812ec 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -247,5 +247,11 @@ export const CONSTANTS: IMap = { Misc. * ls now correctly lists all files. * importing auto save+reloads (@Dawe) + * Fix a bug where .fconf could not be created + * Fix formatting inconsistencies for some logs of netscript functions. + * Fix a bug where Cashroot starter kit would appear as [object Object] in + confirmation dialog. + * Fix some ram not displayed as 0.00GB + * Fix error message throw undefined variable error `, } \ No newline at end of file diff --git a/src/Faction/FactionHelpers.jsx b/src/Faction/FactionHelpers.jsx index 3a597a79a..b679ee076 100644 --- a/src/Faction/FactionHelpers.jsx +++ b/src/Faction/FactionHelpers.jsx @@ -114,9 +114,13 @@ export function purchaseAugmentationBoxCreate(aug, fac) { yesNoBoxClose(); }); + let content = (
); + if(typeof aug.info !== 'string') { + content =
{aug.info}
+ } yesNoBoxCreate(<>

{aug.name}


-


+{content}


Would you like to purchase the {aug.name} Augmentation for  {Money(aug.baseCost * factionInfo.augmentationPriceMult)}? ); diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 0317ad2ec..82d6ea2d7 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -226,8 +226,8 @@ function NetscriptFunctions(workerScript) { "Dynamic RAM usage calculated to be greater than initial RAM usage on fn: " + fnName + ". This is probably because you somehow circumvented the static RAM " + "calculation.

Please don't do that :(

" + - "Dynamic RAM Usage: " + workerScript.dynamicRamUsage + "
" + - "Static RAM Usage: " + workerScript.ramUsage); + "Dynamic RAM Usage: " + numeralWrapper.formatRAM(workerScript.dynamicRamUsage) + "
" + + "Static RAM Usage: " + numeralWrapper.formatRAM(workerScript.ramUsage)); } }; @@ -1120,7 +1120,7 @@ function NetscriptFunctions(workerScript) { throw makeRuntimeErrorMsg("run", "Usage: run(scriptname, [numThreads], [arg1], [arg2]...)"); } if (isNaN(threads) || threads <= 0) { - throw makeRuntimeErrorMsg("run", `Invalid thread count. Must be numeric and > 0, is ${thread}`); + throw makeRuntimeErrorMsg("run", `Invalid thread count. Must be numeric and > 0, is ${threads}`); } var argsForNewScript = []; for (var i = 2; i < arguments.length; ++i) {