From ad8c7b7ffe6968ebc9ce7158477063f1c2bb043e Mon Sep 17 00:00:00 2001 From: Staszek Welsh Date: Tue, 4 Oct 2022 22:55:35 +0100 Subject: [PATCH] Fix change in behaviour of person.hasAugmentation --- src/PersonObjects/PersonMethods.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/PersonObjects/PersonMethods.ts b/src/PersonObjects/PersonMethods.ts index 8ed01d5ef..3b34c3cc0 100644 --- a/src/PersonObjects/PersonMethods.ts +++ b/src/PersonObjects/PersonMethods.ts @@ -199,5 +199,11 @@ export function updateSkillLevels(this: Person): void { } 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; }