mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 10:42:51 +02:00
Formatted/linted (There are some errors, but they aren't mine afaik)
This commit is contained in:
@@ -257,7 +257,7 @@ export function NetscriptCorporation(player: IPlayer, workerScript: WorkerScript
|
||||
|
||||
function getMaterial(divisionName: string, cityName: string, materialName: string): Material {
|
||||
const warehouse = getWarehouse(divisionName, cityName);
|
||||
const matName = (materialName ).replace(/ /g, "");
|
||||
const matName = materialName.replace(/ /g, "");
|
||||
const material = warehouse.materials[matName];
|
||||
if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);
|
||||
return material;
|
||||
@@ -725,9 +725,11 @@ 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(["Training", "Unassigned"].includes(employee.pos) ? 0 : 1000, workerScript).then(function () {
|
||||
return Promise.resolve(AssignJob(employee, job));
|
||||
});
|
||||
return netscriptDelay(["Training", "Unassigned"].includes(employee.pos) ? 0 : 1000, workerScript).then(
|
||||
function () {
|
||||
return Promise.resolve(AssignJob(employee, job));
|
||||
},
|
||||
);
|
||||
},
|
||||
hireEmployee:
|
||||
(ctx: NetscriptContext) =>
|
||||
|
||||
Reference in New Issue
Block a user