Fixes 1918 Reputation Carry Over Bug

fixes #1918
add a check that stops current work if you apply to a new job as an
employee at a different company
This commit is contained in:
TheMas3212 2022-01-06 18:55:16 +11:00
parent 7107dd682c
commit a05dc44599
No known key found for this signature in database
GPG Key ID: 62A173A4FDA683CA

@ -1874,8 +1874,10 @@ export function applyForEmployeeJob(this: IPlayer, sing = false): boolean {
return false;
}
if (this.isQualified(company, CompanyPositions[position])) {
this.companyName = company.name;
this.jobs[company.name] = position;
if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();
this.companyName = company.name;
if (!sing) {
dialogBoxCreate("Congratulations, you are now employed at " + this.location);
}
@ -1899,6 +1901,8 @@ export function applyForPartTimeEmployeeJob(this: IPlayer, sing = false): boolea
}
if (this.isQualified(company, CompanyPositions[position])) {
this.jobs[company.name] = position;
if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();
this.companyName = company.name;
if (!sing) {
dialogBoxCreate("Congratulations, you are now employed part-time at " + this.location);
}
@ -1921,8 +1925,9 @@ export function applyForWaiterJob(this: IPlayer, sing = false): boolean {
return false;
}
if (this.isQualified(company, CompanyPositions[position])) {
this.companyName = company.name;
this.jobs[company.name] = position;
if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();
this.companyName = company.name;
if (!sing) {
dialogBoxCreate("Congratulations, you are now employed as a waiter at " + this.location);
}
@ -1943,8 +1948,9 @@ export function applyForPartTimeWaiterJob(this: IPlayer, sing = false): boolean
return false;
}
if (this.isQualified(company, CompanyPositions[position])) {
this.companyName = company.name;
this.jobs[company.name] = position;
if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();
this.companyName = company.name;
if (!sing) {
dialogBoxCreate("Congratulations, you are now employed as a part-time waiter at " + this.location);
}