From c2ffb09514f179a84825e4d4f59c6dde41e8fbef Mon Sep 17 00:00:00 2001 From: Aerophia <109813468+Aerophia@users.noreply.github.com> Date: Fri, 22 Jul 2022 12:28:51 -0500 Subject: [PATCH] Update Singularity.ts --- src/NetscriptFunctions/Singularity.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index d12ff7505..9bd62ea94 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -1252,11 +1252,10 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript _ctx.helper.checkSingularityAccess(); const nextBN = _ctx.helper.number("nextBN", _nextBN); const callbackScript = _ctx.helper.string("callbackScript", _callbackScript); - + const wd = GetServer(SpecialServers.WorldDaemon); - if (!(wd instanceof Server)) - throw new Error("WorldDaemon was not a normal server. This is a bug contact dev."); - + if (!(wd instanceof Server)) throw new Error("WorldDaemon was not a normal server. This is a bug contact dev."); + _ctx.helper.checkSingularityAccess(); const hackingRequirements = (): boolean => { @@ -1274,7 +1273,7 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript _ctx.log(() => "Requirements not met to destroy the world daemon"); return; } - + wd.backdoorInstalled = true; calculateAchievements(); enterBitNode(Router, false, player.bitNodeN, nextBN); @@ -1285,3 +1284,4 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript }, }; } +