BUGFIX: fix NFG buying current Level instead of next Level (#718)

This commit is contained in:
Caldwell 2023-08-06 15:24:04 +02:00 committed by GitHub
parent 647b78c9f7
commit 5c7b30ef15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

@ -227,4 +227,8 @@ export class Augmentation {
const queuedNFGLevel = Player.queuedAugmentations.filter((aug) => aug.name === this.name).length;
return ownedNFGLevel + queuedNFGLevel;
}
/** Get the next level of an augmentation to buy. Currently only relevant for NFG. */
getNextLevel(): number {
return this.getLevel() + 1;
}
}

@ -84,7 +84,7 @@ export function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = fal
} else if (augCosts.moneyCost === 0 || Player.money >= augCosts.moneyCost) {
const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);
if (aug.name == AugmentationName.NeuroFluxGovernor) {
queuedAugmentation.level = aug.getLevel();
queuedAugmentation.level = aug.getNextLevel();
}
Player.queuedAugmentations.push(queuedAugmentation);