diff --git a/src/PersonObjects/Grafting/ui/GraftingRoot.tsx b/src/PersonObjects/Grafting/ui/GraftingRoot.tsx index a59e32608..055ed5d6e 100644 --- a/src/PersonObjects/Grafting/ui/GraftingRoot.tsx +++ b/src/PersonObjects/Grafting/ui/GraftingRoot.tsx @@ -5,6 +5,7 @@ import { Construction } from "@mui/icons-material"; import { use } from "../../../ui/Context"; import { Money } from "../../../ui/React/Money"; +import { ConfirmationModal } from "../../../ui/React/ConfirmationModal"; import { Augmentations } from "../../../Augmentation/Augmentations"; import { AugmentationNames } from "../../../Augmentation/data/AugmentationNames"; import { Settings } from "../../../Settings/Settings"; @@ -43,6 +44,7 @@ export const GraftingRoot = (): React.ReactElement => { } const [selectedAug, setSelectedAug] = useState(getAvailableAugs(player)[0]); + const [craftOpen, setCraftOpen] = useState(false); return ( @@ -75,14 +77,7 @@ export const GraftingRoot = (): React.ReactElement => { {selectedAug} + setCraftOpen(false)} + onConfirm={() => { + const craftableAug = CraftableAugmentations[selectedAug]; + player.loseMoney(craftableAug.cost, "augmentations"); + player.startCraftAugmentationWork(selectedAug, craftableAug.time); + player.startFocusing(); + router.toWork(); + }} + confirmationText={ + <> + Cancelling crafting will not save crafting progress, and the money you spend will not be + returned. +
+
+ Additionally, grafting an Augmentation will increase the potency of the Entropy virus. + + } + /> Time to Craft: {convertTimeMsToTimeElapsedString(CraftableAugmentations[selectedAug].time)}