Merge pull request #3577 from phyzical/feature/WEB-3567

FEATURE: added logic to allow quitJob to be called from singularity
This commit is contained in:
hydroflame
2022-05-04 11:57:39 -04:00
committed by GitHub
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();