mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-01 13:27:08 +02:00
more refactors
This commit is contained in:
@@ -111,19 +111,6 @@ export function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = fal
|
||||
|
||||
Player.loseMoney(aug.baseCost * factionInfo.augmentationPriceMult, "augmentations");
|
||||
|
||||
// If you just purchased Neuroflux Governor, recalculate the cost
|
||||
if (aug.name == AugmentationNames.NeuroFluxGovernor) {
|
||||
let nextLevel = getNextNeuroFluxLevel();
|
||||
--nextLevel;
|
||||
const mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);
|
||||
aug.baseRepRequirement = 500 * mult * BitNodeMultipliers.AugmentationRepCost;
|
||||
aug.baseCost = 750e3 * mult * BitNodeMultipliers.AugmentationMoneyCost;
|
||||
|
||||
for (let i = 0; i < Player.queuedAugmentations.length - 1; ++i) {
|
||||
aug.baseCost *= CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];
|
||||
}
|
||||
}
|
||||
|
||||
updateAugmentationCosts();
|
||||
|
||||
if (sing) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import Typography from "@mui/material/Typography";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
import TableBody from "@mui/material/TableBody";
|
||||
import Table from "@mui/material/Table";
|
||||
import { CONSTANTS } from "../../Constants";
|
||||
import { getGenericAugmentationPriceMultiplier } from "../../Augmentation/AugmentationHelpers";
|
||||
|
||||
type IProps = {
|
||||
faction: Faction;
|
||||
@@ -180,10 +180,6 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
|
||||
</>
|
||||
);
|
||||
}
|
||||
const mult = Math.pow(
|
||||
CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][player.sourceFileLvl(11)],
|
||||
player.queuedAugmentations.length,
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<Button onClick={props.routeToMainPage}>Back</Button>
|
||||
@@ -204,7 +200,9 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<Typography>Price multiplier: x {numeralWrapper.formatMultiplier(mult)}</Typography>
|
||||
<Typography>
|
||||
Price multiplier: x {numeralWrapper.formatMultiplier(getGenericAugmentationPriceMultiplier())}
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
<Button onClick={() => switchSortOrder(PurchaseAugmentationsOrderSetting.Cost)}>Sort by Cost</Button>
|
||||
|
||||
Reference in New Issue
Block a user