mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
fix(shortcut): job shortcut only run when have job
The shortcut was always allowed to run, meaning when the player doesn't have a job, they were sent to the job screen with no job and lost the view context/sidebar. - Add utility method to check if the player 'hasJob', being at least 1 job. - Check if player has job when the key combination is pressed Resolves danielyxie/bitburner#2013
This commit is contained in:
@@ -247,6 +247,7 @@ export class PlayerObject implements IPlayer {
|
||||
getIntelligenceBonus: (weight: number) => number;
|
||||
getCasinoWinnings: () => number;
|
||||
quitJob: (company: string) => void;
|
||||
hasJob: () => boolean;
|
||||
process: (router: IRouter, numCycles?: number) => void;
|
||||
createHacknetServer: () => HacknetServer;
|
||||
startCreateProgramWork: (router: IRouter, programName: string, time: number, reqLevel: number) => void;
|
||||
@@ -531,6 +532,7 @@ export class PlayerObject implements IPlayer {
|
||||
this.applyForJob = generalMethods.applyForJob;
|
||||
this.getNextCompanyPosition = generalMethods.getNextCompanyPosition;
|
||||
this.quitJob = generalMethods.quitJob;
|
||||
this.hasJob = generalMethods.hasJob;
|
||||
this.applyForSoftwareJob = generalMethods.applyForSoftwareJob;
|
||||
this.applyForSoftwareConsultantJob = generalMethods.applyForSoftwareConsultantJob;
|
||||
this.applyForItJob = generalMethods.applyForItJob;
|
||||
|
||||
Reference in New Issue
Block a user