From 58314094182c3def8bffa943c47e322d9d7d2be9 Mon Sep 17 00:00:00 2001 From: phyzical Date: Thu, 31 Mar 2022 19:00:15 +0800 Subject: [PATCH] move augmentationsCreator to data * only show multiple on purchase augmentation for non infiltrators --- src/Augmentation/AugmentationHelpers.tsx | 3 +-- .../{ => data}/AugmentationCreator.tsx | 14 +++++++------- src/Faction/ui/AugmentationsPage.tsx | 13 ++++++++++--- 3 files changed, 18 insertions(+), 12 deletions(-) rename src/Augmentation/{ => data}/AugmentationCreator.tsx (99%) diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index 99e10eb12..c9f3059c8 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -20,9 +20,8 @@ import { infiltratorsAugmentations, initNeuroFluxGovernor, initUnstableCircadianModulator, -} from "./AugmentationCreator"; +} from "./data/AugmentationCreator"; import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; -import { update } from "lodash"; export function AddToAugmentations(aug: Augmentation): void { const name = aug.name; diff --git a/src/Augmentation/AugmentationCreator.tsx b/src/Augmentation/data/AugmentationCreator.tsx similarity index 99% rename from src/Augmentation/AugmentationCreator.tsx rename to src/Augmentation/data/AugmentationCreator.tsx index f2512a32d..605290cec 100644 --- a/src/Augmentation/AugmentationCreator.tsx +++ b/src/Augmentation/data/AugmentationCreator.tsx @@ -1,11 +1,11 @@ -import { Augmentation, IConstructorParams } from "./Augmentation"; -import { AugmentationNames } from "./data/AugmentationNames"; -import { Player } from "../Player"; -import { Programs } from "../Programs/Programs"; -import { WHRNG } from "../Casino/RNG"; +import { Augmentation, IConstructorParams } from "../Augmentation"; +import { AugmentationNames } from "./AugmentationNames"; +import { Player } from "../../Player"; +import { Programs } from "../../Programs/Programs"; +import { WHRNG } from "../../Casino/RNG"; import React from "react"; -import { FactionNames } from "../Faction/data/FactionNames"; -import { CityName } from "../Locations/data/CityNames"; +import { FactionNames } from "../../Faction/data/FactionNames"; +import { CityName } from "../../Locations/data/CityNames"; function getRandomBonus(): any { const bonuses = [ diff --git a/src/Faction/ui/AugmentationsPage.tsx b/src/Faction/ui/AugmentationsPage.tsx index 89eb9f7f0..bb98e2c3a 100644 --- a/src/Faction/ui/AugmentationsPage.tsx +++ b/src/Faction/ui/AugmentationsPage.tsx @@ -24,6 +24,7 @@ import Tooltip from "@mui/material/Tooltip"; import TableBody from "@mui/material/TableBody"; import Table from "@mui/material/Table"; import { getGenericAugmentationPriceMultiplier } from "../../Augmentation/AugmentationHelpers"; +import { FactionNames } from "../data/FactionNames"; type IProps = { faction: Faction; @@ -187,6 +188,14 @@ export function AugmentationsPage(props: IProps): React.ReactElement { ); } + const multiplierComponent = + props.faction.name !== FactionNames.Infiltrators ? ( + + Price multiplier: x {numeralWrapper.formatMultiplier(getGenericAugmentationPriceMultiplier())} + + ) : ( + <> + ); return ( <> @@ -208,9 +217,7 @@ export function AugmentationsPage(props: IProps): React.ReactElement { } > - - Price multiplier: x {numeralWrapper.formatMultiplier(getGenericAugmentationPriceMultiplier())} - + {multiplierComponent}