mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-25 07:32:27 +01:00
Merge pull request #3616 from jaype87/dev
UI: Sort and color Graft Augmentation list
This commit is contained in:
commit
abd66ad977
@ -95,11 +95,21 @@ export const GraftingRoot = (): React.ReactElement => {
|
|||||||
{getGraftingAvailableAugs(player).length > 0 ? (
|
{getGraftingAvailableAugs(player).length > 0 ? (
|
||||||
<Paper sx={{ my: 1, width: "fit-content", display: "grid", gridTemplateColumns: "1fr 3fr" }}>
|
<Paper sx={{ my: 1, width: "fit-content", display: "grid", gridTemplateColumns: "1fr 3fr" }}>
|
||||||
<List sx={{ height: 400, overflowY: "scroll", borderRight: `1px solid ${Settings.theme.welllight}` }}>
|
<List sx={{ height: 400, overflowY: "scroll", borderRight: `1px solid ${Settings.theme.welllight}` }}>
|
||||||
{getGraftingAvailableAugs(player).map((k, i) => (
|
{getGraftingAvailableAugs(player)
|
||||||
<ListItemButton key={i + 1} onClick={() => setSelectedAug(k)} selected={selectedAug === k}>
|
.sort((a, b) => GraftableAugmentations[a].cost - GraftableAugmentations[b].cost)
|
||||||
<Typography>{k}</Typography>
|
.map((k, i) => (
|
||||||
</ListItemButton>
|
<ListItemButton key={i + 1} onClick={() => setSelectedAug(k)} selected={selectedAug === k}>
|
||||||
))}
|
<Typography
|
||||||
|
sx={{
|
||||||
|
color: canGraft(player, GraftableAugmentations[k])
|
||||||
|
? Settings.theme.primary
|
||||||
|
: Settings.theme.disabled,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{k}
|
||||||
|
</Typography>
|
||||||
|
</ListItemButton>
|
||||||
|
))}
|
||||||
</List>
|
</List>
|
||||||
<Box sx={{ m: 1 }}>
|
<Box sx={{ m: 1 }}>
|
||||||
<Typography variant="h6" sx={{ display: "flex", alignItems: "center", flexWrap: "wrap" }}>
|
<Typography variant="h6" sx={{ display: "flex", alignItems: "center", flexWrap: "wrap" }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user