diff --git a/src/Augmentation/ui/AugmentationsRoot.tsx b/src/Augmentation/ui/AugmentationsRoot.tsx index 7b20f0bd7..9f55c94a8 100644 --- a/src/Augmentation/ui/AugmentationsRoot.tsx +++ b/src/Augmentation/ui/AugmentationsRoot.tsx @@ -16,6 +16,8 @@ import Typography from "@mui/material/Typography"; import Button from "@mui/material/Button"; import Tooltip from "@mui/material/Tooltip"; import Box from "@mui/material/Box"; +import { Settings } from "../../Settings/Settings"; +import { ConfirmationModal } from "../../ui/React/ConfirmationModal"; interface IProps { exportGameFn: () => void; @@ -23,6 +25,7 @@ interface IProps { } export function AugmentationsRoot(props: IProps): React.ReactElement { + const [installOpen, setInstallOpen] = useState(false); const player = use.Player(); const setRerender = useState(false)[1]; function rerender(): void { @@ -43,6 +46,14 @@ export function AugmentationsRoot(props: IProps): React.ReactElement { return ""; } + function doInstall(): void { + if (!Settings.SuppressBuyAugmentationConfirmation) { + setInstallOpen(true); + } else { + props.installAugmentationsFn(); + } + } + return ( <> Augmentations @@ -73,11 +84,36 @@ export function AugmentationsRoot(props: IProps): React.ReactElement { 'I never asked for this'}> - + setInstallOpen(false)} + onConfirm={props.installAugmentationsFn} + confirmationText={ + <> + Installing will reset +
+
- money +
- skill / experience +
- every server except home +
- factions and reputation +
+
+ You will keep: +
+
- All scripts on home +
- home ram and cores +
+
+ It is recommended to install several Augmentations at once. Preferably everything from any faction of your + chosing. + + } + /> It's always a good idea to backup/export your save!}> + + setSoftResetOpen(false)} + onConfirm={props.softReset} + confirmationText={"This will perform the same action as installing Augmentations, are you sure?"} + />