mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
Rebase fix, move hasAugmentation to Person
This commit is contained in:
@@ -2,31 +2,8 @@
|
||||
* Augmentation-related methods for the Player class (PlayerObject)
|
||||
*/
|
||||
import { PlayerObject } from "./PlayerObject";
|
||||
|
||||
import { Augmentation } from "../../Augmentation/Augmentation";
|
||||
|
||||
import { calculateEntropy } from "../Grafting/EntropyAccumulation";
|
||||
|
||||
export function hasAugmentation(this: PlayerObject, aug: string | Augmentation, ignoreQueued = false): boolean {
|
||||
const augName: string = aug instanceof Augmentation ? aug.name : aug;
|
||||
|
||||
for (const owned of this.augmentations) {
|
||||
if (owned.name === augName) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreQueued) {
|
||||
for (const owned of this.queuedAugmentations) {
|
||||
if (owned.name === augName) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function applyEntropy(this: PlayerObject, stacks = 1): void {
|
||||
// Re-apply all multipliers
|
||||
this.reapplyAllAugmentations();
|
||||
|
||||
Reference in New Issue
Block a user