From d4f3cf7d817c460f8130d7295b976151d290d99a Mon Sep 17 00:00:00 2001 From: TheAimMan <147098375+TheAimMan@users.noreply.github.com> Date: Fri, 26 Jul 2024 18:05:27 -0400 Subject: [PATCH] BUGFIX: Stop current work when starting a program with Singularity (#1521) --- src/NetscriptFunctions/Singularity.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index b034910fe..a435fe1ee 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -1026,6 +1026,9 @@ export function NetscriptSingularity(): InternalAPI { helpers.log(ctx, () => `Hacking level is too low to create '${p.name}' (level ${create.level} req)`); return false; } + if (Player.currentWork) { + Player.finishWork(true); + } Player.startWork( new CreateProgramWork({