From 756d5fbc0dc3157554b7646af18f659cbcce1c97 Mon Sep 17 00:00:00 2001 From: TheMas3212 Date: Sun, 9 Jan 2022 14:16:44 +1100 Subject: [PATCH] clear Player.companyName if set to company when quiting work for said company --- src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index 3990540b0..325b3d399 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -1793,6 +1793,9 @@ export function quitJob(this: IPlayer, company: string): void { this.isWorking = false; this.companyName = ""; } + if (this.companyName === company) { + this.companyName = ""; + } delete this.jobs[company]; }