fix bladeburner action cancel

This commit is contained in:
Olivier Gagnon
2021-11-12 16:54:34 -05:00
parent 0eec018faf
commit f5d6132dfc
6 changed files with 13 additions and 10 deletions

View File

@@ -5,7 +5,7 @@ import { IPlayer } from "../IPlayer";
import { Augmentation } from "../../Augmentation/Augmentation";
export function hasAugmentation(this: IPlayer, aug: string | Augmentation): boolean {
export function hasAugmentation(this: IPlayer, aug: string | Augmentation, installed = false): boolean {
const augName: string = aug instanceof Augmentation ? aug.name : aug;
for (const owned of this.augmentations) {
@@ -14,9 +14,11 @@ export function hasAugmentation(this: IPlayer, aug: string | Augmentation): bool
}
}
for (const owned of this.queuedAugmentations) {
if (owned.name === augName) {
return true;
if (!installed) {
for (const owned of this.queuedAugmentations) {
if (owned.name === augName) {
return true;
}
}
}