mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 06:02:26 +01:00
Merge pull request #4049 from MPJ-K/dev
NETSCRIPT: FIX #3963 Prevent bladeburner.setActionLevel from setting invalid action levels
This commit is contained in:
commit
a0475cc630
@ -250,7 +250,7 @@ export function NetscriptBladeburner(): InternalAPI<INetscriptBladeburner> {
|
|||||||
checkBladeburnerAccess(ctx);
|
checkBladeburnerAccess(ctx);
|
||||||
const action = getBladeburnerActionObject(ctx, type, name);
|
const action = getBladeburnerActionObject(ctx, type, name);
|
||||||
if (level < 1 || level > action.maxLevel) {
|
if (level < 1 || level > action.maxLevel) {
|
||||||
helpers.makeRuntimeErrorMsg(ctx, `Level must be between 1 and ${action.maxLevel}, is ${level}`);
|
throw helpers.makeRuntimeErrorMsg(ctx, `Level must be between 1 and ${action.maxLevel}, is ${level}`);
|
||||||
}
|
}
|
||||||
action.level = level;
|
action.level = level;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user