Fix default value for hireEmployee

Not providing a position now hires unassigned just like the documentation says
This commit is contained in:
omuretsu 2023-07-11 11:50:55 -04:00
parent 05651aa7f5
commit 61a27fb9c7

@ -598,8 +598,9 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
);
return office.autoAssignJob(job, amount);
},
hireEmployee: (ctx) => (_divisionName, _cityName, _position?) => {
hireEmployee: (ctx) => (_divisionName, _cityName, _position) => {
checkAccess(ctx, CorpUnlockName.OfficeAPI);
_position ??= CorpEmployeeJob.Unassigned;
const divisionName = helpers.string(ctx, "divisionName", _divisionName);
const cityName = getEnumHelper("CityName").nsGetMember(ctx, _cityName);
const position = getEnumHelper("CorpEmployeeJob").nsGetMember(ctx, _position, "position");