mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 22:23:51 +01:00
Fix quitting active job
When quitting active job, if there is another job, set the first remaining job as active.
This commit is contained in:
parent
bc10d30d43
commit
bd07dea516
@ -1870,13 +1870,12 @@ export function getNextCompanyPosition(
|
||||
|
||||
export function quitJob(this: IPlayer, company: string): void {
|
||||
if (this.isWorking == true && this.workType.includes("Working for Company") && this.companyName == company) {
|
||||
this.isWorking = false;
|
||||
this.companyName = "";
|
||||
}
|
||||
if (this.companyName === company) {
|
||||
this.companyName = "";
|
||||
this.finishWork(true);
|
||||
}
|
||||
delete this.jobs[company];
|
||||
if (this.companyName === company) {
|
||||
this.companyName = this.hasJob() ? Object.keys(this.jobs)[0] : "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user