mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02: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