From dfe9e98c77f4d1de558b2c9daa854aeac7800c0f Mon Sep 17 00:00:00 2001 From: phyzical Date: Mon, 4 Apr 2022 18:29:43 +0800 Subject: [PATCH 1/2] move route to terminal to the inside of the common fucntion * tested without bandaid still works correctly * fix default script with installAugmentations --- src/Augmentation/AugmentationHelpers.tsx | 2 ++ src/NetscriptFunctions/Singularity.ts | 2 +- src/ui/GameRoot.tsx | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index d30f80786..1d00506c6 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -21,6 +21,7 @@ import { initNeuroFluxGovernor, initUnstableCircadianModulator, } from "./AugmentationCreator"; +import { Router } from "../ui/GameRoot"; export function AddToAugmentations(aug: Augmentation): void { const name = aug.name; @@ -186,6 +187,7 @@ function installAugmentations(): boolean { "
You wake up in your home...you feel different...", ); prestigeAugmentation(); + Router.toTerminal(); return true; } diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index 51daf0189..0e813e303 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -218,7 +218,7 @@ export function NetscriptSingularity( workerScript.running = false; killWorkerScript(workerScript); }, - installAugmentations: function (_cbScript: unknown): boolean { + installAugmentations: function (_cbScript: unknown = ""): boolean { const cbScript = helper.string("installAugmentations", "cbScript", _cbScript); helper.updateDynamicRam("installAugmentations", getRamCost(player, "installAugmentations")); helper.checkSingularityAccess("installAugmentations"); diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 3934fbd6c..f8a94602e 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -491,7 +491,6 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme }} installAugmentationsFn={() => { installAugmentations(); - Router.toTerminal(); }} /> ); From 2ee73cc8d621d4dbe7156a169a79bf11b33e3b87 Mon Sep 17 00:00:00 2001 From: phyzical Date: Mon, 4 Apr 2022 18:34:07 +0800 Subject: [PATCH 2/2] missing space --- src/Faction/FactionInfo.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Faction/FactionInfo.tsx b/src/Faction/FactionInfo.tsx index 76d7a8c64..537f98375 100644 --- a/src/Faction/FactionInfo.tsx +++ b/src/Faction/FactionInfo.tsx @@ -517,8 +517,8 @@ export const FactionInfos: IMap = { It's too bad they won't live. But then again, who does?

- Note that for this faction, reputation can only be gained through {FactionNames.Bladeburners} actions. Completing {FactionNames.Bladeburners} - contracts/operations will increase your reputation. + Note that for this faction, reputation can only be gained through {FactionNames.Bladeburners} actions.{" "} + Completing {FactionNames.Bladeburners} contracts/operations will increase your reputation. ), [],