mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +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);
|
const job = helpers.string(ctx, "job", _job);
|
||||||
|
|
||||||
if (!checkEnum(EmployeePositions, job)) throw new Error(`'${job}' is not a valid 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))
|
if (amount < 0 || !Number.isInteger(amount))
|
||||||
throw helpers.makeRuntimeErrorMsg(
|
throw helpers.makeRuntimeErrorMsg(
|
||||||
ctx,
|
ctx,
|
||||||
|
|||||||
Reference in New Issue
Block a user