Merge pull request #3195 from BrianLDev/issue-3194

Fix #3194: include all division employees in small town achievement calc
This commit is contained in:
hydroflame 2022-03-20 14:15:37 -04:00 committed by GitHub
commit 21cab81ba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -460,10 +460,12 @@ export const achievements: IMap<Achievement> = {
Condition: (): boolean => {
if (Player.corporation === null) return false;
for (const d of Player.corporation.divisions) {
let employeeCount = 0;
for (const o of Object.values(d.offices)) {
if (o === 0) continue;
if (o.employees.length >= 3000) return true;
employeeCount += o.employees.length;
}
if (employeeCount >= 3000) return true;
}
return false;
},