Merge pull request #3847 from Snarling/QuitWorkFix

COMPANY: FIX #3837, #3830 corrected backwards logic in quitJob function
This commit is contained in:
hydroflame 2022-07-06 12:35:14 -04:00 committed by GitHub
commit 904f45f610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1854,7 +1854,11 @@ export function getNextCompanyPosition(
} }
export function quitJob(this: IPlayer, company: string, _sing = false): void { export function quitJob(this: IPlayer, company: string, _sing = false): void {
if (this.isWorking == true && this.workType !== WorkType.Company && this.companyName == company) { if (
this.isWorking === true &&
[WorkType.Company, WorkType.CompanyPartTime].includes(this.workType) &&
this.companyName === company
) {
this.finishWork(true); this.finishWork(true);
} }
delete this.jobs[company]; delete this.jobs[company];