mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +01:00
increment employees the right way (#869)
move the incrementation of employees after the avg calc
This commit is contained in:
parent
ad03e4ee82
commit
9c41995e59
@ -179,10 +179,6 @@ export class OfficeSpace {
|
||||
if (this.atCapacity()) return false;
|
||||
if (document.getElementById("cmpy-mgmt-hire-employee-popup") != null) return false;
|
||||
|
||||
++this.numEmployees;
|
||||
++this.employeeJobs[position];
|
||||
++this.employeeNextJobs[position];
|
||||
|
||||
this.totalExperience += getRandomInt(50, 100);
|
||||
|
||||
this.avgMorale = (this.avgMorale * this.numEmployees + getRandomInt(50, 100)) / (this.numEmployees + 1);
|
||||
@ -192,6 +188,10 @@ export class OfficeSpace {
|
||||
this.avgCharisma = (this.avgCharisma * this.numEmployees + getRandomInt(50, 100)) / (this.numEmployees + 1);
|
||||
this.avgCreativity = (this.avgCreativity * this.numEmployees + getRandomInt(50, 100)) / (this.numEmployees + 1);
|
||||
this.avgEfficiency = (this.avgEfficiency * this.numEmployees + getRandomInt(50, 100)) / (this.numEmployees + 1);
|
||||
|
||||
++this.numEmployees;
|
||||
++this.employeeJobs[position];
|
||||
++this.employeeNextJobs[position];
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user