mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 17:53:00 +02:00
fix bladeburner action cancel
This commit is contained in:
@@ -195,7 +195,7 @@ export interface IPlayer {
|
||||
getUpgradeHomeRamCost(): number;
|
||||
getUpgradeHomeCoresCost(): number;
|
||||
gotoLocation(to: LocationName): boolean;
|
||||
hasAugmentation(aug: string | Augmentation): boolean;
|
||||
hasAugmentation(aug: string | Augmentation, installed?: boolean): boolean;
|
||||
hasCorporation(): boolean;
|
||||
hasGangWith(facName: string): boolean;
|
||||
hasTorRouter(): boolean;
|
||||
|
||||
@@ -200,7 +200,7 @@ export class PlayerObject implements IPlayer {
|
||||
getUpgradeHomeRamCost: () => number;
|
||||
getUpgradeHomeCoresCost: () => number;
|
||||
gotoLocation: (to: LocationName) => boolean;
|
||||
hasAugmentation: (aug: string | Augmentation) => boolean;
|
||||
hasAugmentation: (aug: string | Augmentation, installed?: boolean) => boolean;
|
||||
hasCorporation: () => boolean;
|
||||
hasGangWith: (facName: string) => boolean;
|
||||
hasTorRouter: () => boolean;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user