mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 16:13:49 +01:00
fix prices of augments reseting when refreshing the game
This commit is contained in:
parent
6f5d22c1bd
commit
5486398199
@ -22,6 +22,7 @@ import {
|
||||
initUnstableCircadianModulator,
|
||||
} from "./AugmentationCreator";
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
import { update } from "lodash";
|
||||
|
||||
export function AddToAugmentations(aug: Augmentation): void {
|
||||
const name = aug.name;
|
||||
@ -103,6 +104,12 @@ function updateInfiltratorCosts(infiltratorAugmentation: Augmentation): void {
|
||||
}
|
||||
}
|
||||
|
||||
function updateGeneralAugmentationPrice(augmentation: Augmentation): void {
|
||||
for (let i = 0; i < Player.queuedAugmentations.length; ++i) {
|
||||
augmentation.baseCost = augmentation.startingCost * getGenericAugmentationPriceMultiplier();
|
||||
}
|
||||
}
|
||||
|
||||
export function updateAugmentationCosts(): void {
|
||||
for (const name of Object.keys(Augmentations)) {
|
||||
if (Augmentations.hasOwnProperty(name)) {
|
||||
@ -112,7 +119,7 @@ export function updateAugmentationCosts(): void {
|
||||
} else if (augmentationToUpdate.factions.includes(FactionNames.Infiltrators)) {
|
||||
updateInfiltratorCosts(augmentationToUpdate);
|
||||
} else {
|
||||
augmentationToUpdate.baseCost *= getGenericAugmentationPriceMultiplier();
|
||||
updateGeneralAugmentationPrice(augmentationToUpdate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user