From 33d8e6d3fe3fce7550a5cd3dae3bcba906271751 Mon Sep 17 00:00:00 2001 From: Hedrauta Date: Fri, 24 Dec 2021 02:19:28 +0100 Subject: [PATCH 1/2] workaround? fix for #1921 simple do: if the player does work for company, quit WIP... otherwise let WIP still run --- src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index b85dee8e7..1a11cb8b0 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -1781,7 +1781,9 @@ export function getNextCompanyPosition( } export function quitJob(this: IPlayer, company: string): void { - this.isWorking = false; + if (this.isWorking == true && this.workType == "Working for Company") { + this.isWorking = false; + } this.companyName = ""; delete this.jobs[company]; } From 4264b07d75b137fb97488a829685971ff3f9f3ec Mon Sep 17 00:00:00 2001 From: Hedrauta Date: Fri, 24 Dec 2021 02:57:25 +0100 Subject: [PATCH 2/2] only stop working if working at that company bc you can be employed at multiple companies :laughing: --- src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index 1a11cb8b0..aeda15ac4 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -1781,10 +1781,10 @@ export function getNextCompanyPosition( } export function quitJob(this: IPlayer, company: string): void { - if (this.isWorking == true && this.workType == "Working for Company") { + if (this.isWorking == true && this.workType == "Working for Company" && this.companyName == company) { this.isWorking = false; + this.companyName = ""; } - this.companyName = ""; delete this.jobs[company]; }