BUGFIX: Stop current work when starting a program with Singularity (#1521)

This commit is contained in:
TheAimMan 2024-07-26 18:05:27 -04:00 committed by GitHub
parent dd5fcc077a
commit d4f3cf7d81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1026,6 +1026,9 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
helpers.log(ctx, () => `Hacking level is too low to create '${p.name}' (level ${create.level} req)`); helpers.log(ctx, () => `Hacking level is too low to create '${p.name}' (level ${create.level} req)`);
return false; return false;
} }
if (Player.currentWork) {
Player.finishWork(true);
}
Player.startWork( Player.startWork(
new CreateProgramWork({ new CreateProgramWork({