mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-11 04:42:34 +01:00
CORPORATION: prevent "Unassigned" as job in setAutoJobAssignment (#308)
This commit is contained in:
@ -608,6 +608,7 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
|
||||
const job = helpers.string(ctx, "job", _job);
|
||||
|
||||
if (!checkEnum(EmployeePositions, job)) throw new Error(`'${job}' is not a valid job.`);
|
||||
if (job === EmployeePositions.Unassigned) return false;
|
||||
if (amount < 0 || !Number.isInteger(amount))
|
||||
throw helpers.makeRuntimeErrorMsg(
|
||||
ctx,
|
||||
|
Reference in New Issue
Block a user