Ensure that we leave focus when we call stopAction or cancel working

This commit is contained in:
Jeffrey A. Robinson 2022-01-11 21:08:15 -08:00
parent b7fb59691b
commit 664e99e3de
2 changed files with 2 additions and 0 deletions

@ -738,6 +738,7 @@ export function NetscriptSingularity(
helper.checkSingularityAccess("stopAction"); helper.checkSingularityAccess("stopAction");
if (player.isWorking) { if (player.isWorking) {
if (player.focus) { if (player.focus) {
player.stopFocusing();
Router.toTerminal(); Router.toTerminal();
} }
const txt = player.singularityStopWork(); const txt = player.singularityStopWork();

@ -729,6 +729,7 @@ export function finishWork(this: IPlayer, cancelled: boolean, sing = false): str
} }
this.isWorking = false; this.isWorking = false;
this.focus = false;
this.resetWorkStatus(); this.resetWorkStatus();
if (sing) { if (sing) {