Skip to content

Commit

Permalink
Merge pull request danielyxie#3766 from jeek/dev
Browse files Browse the repository at this point in the history
Speed up assigning of employees currently without a job.
  • Loading branch information
hydroflame authored May 25, 2022
2 parents 216055b + e14a61e commit 7bc9177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NetscriptFunctions/Corporation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ export function NetscriptCorporation(player: IPlayer, workerScript: WorkerScript
const employeeName = ctx.helper.string("employeeName", _employeeName);
const job = ctx.helper.string("job", _job);
const employee = getEmployee(divisionName, cityName, employeeName);
return netscriptDelay(1000, workerScript).then(function () {
return netscriptDelay(["Training", "Unassigned"].includes(employee.pos) ? 0 : 1000, workerScript).then(function () {
return Promise.resolve(AssignJob(employee, job));
});
},
Expand Down

0 comments on commit 7bc9177

Please sign in to comment.