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).
This commit is contained in:
Sage Pointer
2022-01-03 07:31:48 +02:00
committed by GitHub
parent 1e21689e95
commit c19e5d0fe6

View File

@ -285,6 +285,7 @@ export class Terminal implements ITerminal {
return; return;
} }
if (!(server instanceof Server)) throw new Error("server should be normal server"); if (!(server instanceof Server)) throw new Error("server should be normal server");
server.backdoorInstalled = true;
if (SpecialServers.WorldDaemon === server.hostname) { if (SpecialServers.WorldDaemon === server.hostname) {
if (player.bitNodeN == null) { if (player.bitNodeN == null) {
player.bitNodeN = 1; player.bitNodeN = 1;
@ -292,7 +293,6 @@ export class Terminal implements ITerminal {
router.toBitVerse(false, false); router.toBitVerse(false, false);
return; return;
} }
server.backdoorInstalled = true;
this.print("Backdoor successful!"); this.print("Backdoor successful!");
} }
} }