PRESTIGE: Make bitnode reset synchronous again (#566)

* Make prestige synchronous
This commit is contained in:
Snarling
2023-06-03 18:04:45 -04:00
committed by GitHub
parent ec9e7ffa3a
commit 403beef69e
4 changed files with 16 additions and 20 deletions

View File

@@ -1206,7 +1206,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
: false;
if (cbScript === null) throw helpers.makeRuntimeErrorMsg(ctx, `Could not resolve file path: ${_cbScript}`);
enterBitNode(true, Player.bitNodeN, nextBN);
if (cbScript) setTimeout(() => runAfterReset(cbScript), 0);
if (cbScript) setTimeout(() => runAfterReset(cbScript), 500);
},
destroyW0r1dD43m0n: (ctx) => (_nextBN, _cbScript) => {
helpers.checkSingularityAccess(ctx);
@@ -1239,7 +1239,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
wd.backdoorInstalled = true;
calculateAchievements();
enterBitNode(false, Player.bitNodeN, nextBN);
if (cbScript) setTimeout(() => runAfterReset(cbScript), 0);
if (cbScript) setTimeout(() => runAfterReset(cbScript), 500);
},
getCurrentWork: () => () => {
if (!Player.currentWork) return null;