Update Singularity.ts

This commit is contained in:
Aerophia 2022-07-22 10:29:40 -05:00 committed by GitHub
parent 5d2b81053d
commit 757711ce5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1251,12 +1251,14 @@ 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.");
_ctx.helper.checkSingularityAccess();
const hackingRequirements = (): boolean => {
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 (player.hacking < wd.requiredHackingSkill) return false;
if (!wd.hasAdminRights) return false;
return true;
@ -1271,7 +1273,8 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
_ctx.log(() => "Requirements not met to destroy the world daemon");
return;
}
wd.backdoorInstalled = true
enterBitNode(Router, false, player.bitNodeN, nextBN);
if (callbackScript)
setTimeout(() => {