added logic to allow quitJob to be called from singularity

This commit is contained in:
phyzical
2022-04-28 19:05:56 +08:00
parent 9c805dabb8
commit 711955c112
6 changed files with 22 additions and 3 deletions
+6
View File
@@ -947,6 +947,12 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
}
return res;
},
quitJob: (_ctx: NetscriptContext) =>
function (_companyName: unknown): void {
_ctx.helper.checkSingularityAccess();
const companyName = _ctx.helper.string("companyName", _companyName);
player.quitJob(companyName);
},
getCompanyRep: (_ctx: NetscriptContext) =>
function (_companyName: unknown): number {
_ctx.helper.checkSingularityAccess();