Merge pull request #4201 from stalefishies/has-augmentation-fix

MISC: Fix bug in person.hasAugmentation
This commit is contained in:
hydroflame 2022-10-09 00:27:05 -04:00 committed by GitHub
commit 87ad634859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
} }