mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Fix #1916: Check blade console blackops rank
This prevents the player from starting a blackops without having the rank requirements
This commit is contained in:
parent
f2ccc63b2d
commit
dbe36fd6b7
@ -164,6 +164,12 @@ export class Bladeburner implements IBladeburner {
|
||||
}
|
||||
|
||||
const action = this.getActionObject(actionId);
|
||||
if (!(action instanceof BlackOperation)) throw new Error(`Action should be BlackOperation but isn't`);
|
||||
if (action.reqdRank > (player.bladeburner?.rank ?? 0)) {
|
||||
this.resetAction();
|
||||
this.log("Error: Tried to start a Black Operation without the rank requirement");
|
||||
break;
|
||||
}
|
||||
if (action == null) {
|
||||
throw new Error("Failed to get BlackOperation object for: " + actionId.name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user