mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-28 03:47:03 +02:00
Fix docs for employeeProd and add employeeJobs.
This commit is contained in:
@@ -29,6 +29,14 @@ export class OfficeSpace {
|
||||
[EmployeePositions.RandD]: 0,
|
||||
total: 0,
|
||||
};
|
||||
employeeJobs: { [key: string]: number } = {
|
||||
[EmployeePositions.Operations]: 0,
|
||||
[EmployeePositions.Engineer]: 0,
|
||||
[EmployeePositions.Business]: 0,
|
||||
[EmployeePositions.Management]: 0,
|
||||
[EmployeePositions.RandD]: 0,
|
||||
total: 0,
|
||||
};
|
||||
|
||||
constructor(params: IParams = {}) {
|
||||
this.loc = params.loc ? params.loc : "";
|
||||
@@ -48,6 +56,8 @@ export class OfficeSpace {
|
||||
}
|
||||
}
|
||||
|
||||
this.calculateTotalEmployees(corporation, industry);
|
||||
|
||||
// Process Office properties
|
||||
this.maxEne = 100;
|
||||
this.maxHap = 100;
|
||||
@@ -101,6 +111,19 @@ export class OfficeSpace {
|
||||
return salaryPaid;
|
||||
}
|
||||
|
||||
calculateTotalEmployees(corporation: ICorporation, industry: IIndustry): void {
|
||||
//Reset
|
||||
for (const name of Object.keys(this.employeeJobs)) {
|
||||
this.employeeJobs[name] = 0;
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.employees.length; ++i) {
|
||||
const employee = this.employees[i];
|
||||
this.employeeJobs[employee.pos]++;
|
||||
}
|
||||
this.employeeJobs.total = this.employees.length;
|
||||
}
|
||||
|
||||
calculateEmployeeProductivity(corporation: ICorporation, industry: IIndustry): void {
|
||||
//Reset
|
||||
for (const name of Object.keys(this.employeeProd)) {
|
||||
|
||||
Reference in New Issue
Block a user