DEVMENU: Fix bugs in WD tools (#2141)

This commit is contained in:
catloversg
2025-05-20 10:35:28 +07:00
committed by GitHub
parent 1d48f64321
commit f1f7a50721
3 changed files with 30 additions and 15 deletions
+13
View File
@@ -81,3 +81,16 @@ export function setBitNodeOptions(bitNodeOptions: BitNodeOptions): void {
Object.assign(Player.bitNodeOptions, bitNodeOptions);
}
/**
* This function only sets the backdoorInstalled flag of the WD server. The caller must call Router.toPage() to route
* the UI to the BitVerse page. Importing Router from src\ui\GameRoot.tsx brings too many unnecessary dependencies to
* this utility file.
*/
export function finishBitNode() {
const wd = GetServer(SpecialServers.WorldDaemon);
if (!(wd instanceof Server)) {
throw new Error("WorldDaemon is not a normal server. This is a bug. Please contact developers.");
}
wd.backdoorInstalled = true;
}