From 0bd8d3cb8fcdece9bbb112a239acbf931cf51dfb Mon Sep 17 00:00:00 2001 From: Sage Pointer Date: Mon, 3 Jan 2022 07:31:48 +0200 Subject: [PATCH] Fix some achievements not triggered if hacked with backdoor command Moving to BitVerse and returning from function happened before setting backdoorInstalled property to true, so Achievement Handler believed the current BitNode was not finished (unless we applied backdoor through hack command, which has correct code). --- src/Terminal/Terminal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Terminal/Terminal.ts b/src/Terminal/Terminal.ts index 4f5f276a7..de857e2bd 100644 --- a/src/Terminal/Terminal.ts +++ b/src/Terminal/Terminal.ts @@ -285,6 +285,7 @@ export class Terminal implements ITerminal { return; } if (!(server instanceof Server)) throw new Error("server should be normal server"); + server.backdoorInstalled = true; if (SpecialServers.WorldDaemon === server.hostname) { if (player.bitNodeN == null) { player.bitNodeN = 1; @@ -292,7 +293,6 @@ export class Terminal implements ITerminal { router.toBitVerse(false, false); return; } - server.backdoorInstalled = true; this.print("Backdoor successful!"); } }