Fix change in behaviour of person.hasAugmentation

This commit is contained in:
Staszek Welsh 2022-10-04 22:55:35 +01:00
parent 01f6c6cb7a
commit ad8c7b7ffe

@ -199,5 +199,11 @@ export function updateSkillLevels(this: Person): void {
} }
export function hasAugmentation(this: Person, augName: string, ignoreQueued = false) { export function hasAugmentation(this: Person, augName: string, ignoreQueued = false) {
return this.augmentations.some((a) => a.name === augName && (ignoreQueued || !this.queuedAugmentations.includes(a))); if (this.augmentations.some((a) => a.name === augName)) {
return true;
}
if (!ignoreQueued && this.queuedAugmentations.some((a) => a.name === augName)) {
return true;
}
return false;
} }