From f12a117f06929a4aa0a7233f14d22f9acde2ca7f Mon Sep 17 00:00:00 2001 From: nickofolas Date: Fri, 22 Apr 2022 13:21:20 -0500 Subject: [PATCH] Further design updates --- .../ui/PurchaseableAugmentations.tsx | 32 ++++++++------ .../Sleeve/ui/SleeveAugmentationsModal.tsx | 43 +++++++++++-------- 2 files changed, 45 insertions(+), 30 deletions(-) diff --git a/src/Augmentation/ui/PurchaseableAugmentations.tsx b/src/Augmentation/ui/PurchaseableAugmentations.tsx index e931de57a..ae40d5602 100644 --- a/src/Augmentation/ui/PurchaseableAugmentations.tsx +++ b/src/Augmentation/ui/PurchaseableAugmentations.tsx @@ -16,7 +16,7 @@ import { numeralWrapper } from "../../ui/numeralFormat"; import { Money } from "../../ui/React/Money"; import { Reputation } from "../../ui/React/Reputation"; -import { CheckBox, CheckBoxOutlineBlank } from "@mui/icons-material"; +import { CheckBox, CheckBoxOutlineBlank, Verified, Info } from "@mui/icons-material"; import { Augmentation as AugFormat } from "../../ui/React/Augmentation"; import { Paper, Button, Typography, Tooltip, Box, TableRow, Container, List, ListItem } from "@mui/material"; import { TableCell } from "../../ui/React/Table"; @@ -93,23 +93,16 @@ export const PurchaseableAugmentations = (props: IPurchaseableAugsProps): React. {props.augNames.map((augName: string) => { const aug = Augmentations[augName]; const info = typeof aug.info === "string" ? {aug.info} : aug.info; - const description = ( - <> - {info} -
-
- {aug.stats} - - ); + const description = aug.stats; return ( - + + + {aug.factions.length === 1 && ( + + + Faction-Exclusive Augmentation + + )} + Cost: @@ -137,6 +138,7 @@ export const PurchaseableAugmentations = (props: IPurchaseableAugsProps): React. valueColor={Settings.theme.rep} /> )} + {aug.prereqs.length > 0 && ( <> @@ -153,8 +155,14 @@ export const PurchaseableAugmentations = (props: IPurchaseableAugsProps): React. )} + - {aug.name} + + {info}}> + + + {aug.name} + {description} diff --git a/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx b/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx index e17118e8c..9087fffc1 100644 --- a/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx +++ b/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx @@ -3,13 +3,11 @@ import { Sleeve } from "../Sleeve"; import { findSleevePurchasableAugs } from "../SleeveHelpers"; import { Augmentations } from "../../../Augmentation/Augmentations"; import { Augmentation } from "../../../Augmentation/Augmentation"; +import { PurchaseableAugmentations } from "../../../Augmentation/ui/PurchaseableAugmentations"; import { Money } from "../../../ui/React/Money"; import { Modal } from "../../../ui/React/Modal"; import { use } from "../../../ui/Context"; -import Typography from "@mui/material/Typography"; -import Tooltip from "@mui/material/Tooltip"; -import Paper from "@mui/material/Paper"; -import Box from "@mui/material/Box"; +import { Typography, Tooltip, Paper, Box, Container } from "@mui/material"; import Button from "@mui/material/Button"; import TableBody from "@mui/material/TableBody"; import Table from "@mui/material/Table"; @@ -49,17 +47,27 @@ export function SleeveAugmentationsModal(props: IProps): React.ReactElement { return ( - <> - - - You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they - would for you. You can only purchase Augmentations that you have unlocked through Factions. -
-
- When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the - Duplicate Sleeve will immediately lose all of its stat experience. -
- + + + You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they + would for you. You can only purchase Augmentations that you have unlocked through Factions. +
+
+ When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the + Duplicate Sleeve will immediately lose all of its stat experience. +
+ aug.name)} + player={player} + canPurchase={(player, aug) => { + return player.money > aug.startingCost; + }} + purchaseAugmentation={(player, aug, _showModal) => { + props.sleeve.tryBuyAugmentation(player, aug); + rerender(); + }} + /> + {/* {availableAugs.map((aug) => { @@ -85,8 +93,7 @@ export function SleeveAugmentationsModal(props: IProps): React.ReactElement { })}
-
-
+
*/} {ownedAugNames.length > 0 && ( <> @@ -115,7 +122,7 @@ export function SleeveAugmentationsModal(props: IProps): React.ReactElement { )} - +
); }