Skip to content

Commit

Permalink
UI: Add grafting to sidebar (#1809)
Browse files Browse the repository at this point in the history
  • Loading branch information
catloversg authored Jan 12, 2025
1 parent c37cdc7 commit 1525e51
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/Sidebar/ui/SidebarRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ListItemIcon from "@mui/material/ListItemIcon";
import ListItemText from "@mui/material/ListItemText";
import Typography from "@mui/material/Typography";

import ComputerIcon from "@mui/icons-material/Computer";
import ComputerIcon from "@mui/icons-material/Computer"; // Hacking
import LastPageIcon from "@mui/icons-material/LastPage"; // Terminal
import CreateIcon from "@mui/icons-material/Create"; // Create Script
import StorageIcon from "@mui/icons-material/Storage"; // Active Scripts
Expand All @@ -33,12 +33,13 @@ import SportsMmaIcon from "@mui/icons-material/SportsMma"; // Gang
import CheckIcon from "@mui/icons-material/Check"; // Milestones
import HelpIcon from "@mui/icons-material/Help"; // Tutorial
import SettingsIcon from "@mui/icons-material/Settings"; // options
import DeveloperBoardIcon from "@mui/icons-material/DeveloperBoard"; // Dev
import DeveloperBoardIcon from "@mui/icons-material/DeveloperBoard"; // Stanek + Dev
import EmojiEventsIcon from "@mui/icons-material/EmojiEvents"; // Achievements
import AccountBoxIcon from "@mui/icons-material/AccountBox";
import PublicIcon from "@mui/icons-material/Public";
import LiveHelpIcon from "@mui/icons-material/LiveHelp";
import BorderInnerSharp from "@mui/icons-material/BorderInnerSharp";
import AccountBoxIcon from "@mui/icons-material/AccountBox"; // Character
import PublicIcon from "@mui/icons-material/Public"; // World
import LiveHelpIcon from "@mui/icons-material/LiveHelp"; // Help
import BorderInnerSharpIcon from "@mui/icons-material/BorderInnerSharp"; // IPvGO
import BiotechIcon from "@mui/icons-material/Biotech"; // Grafting

import { Router } from "../../ui/GameRoot";
import { Page, isSimplePage } from "../../ui/Router";
Expand All @@ -48,7 +49,7 @@ import { CONSTANTS } from "../../Constants";
import { iTutorialSteps, iTutorialNextStep, ITutorial } from "../../InteractiveTutorial";
import { getAvailableCreatePrograms } from "../../Programs/ProgramHelpers";
import { Settings } from "../../Settings/Settings";
import { AugmentationName } from "@enums";
import { AugmentationName, CityName } from "@enums";

import { ProgramsSeen } from "../../Programs/ui/ProgramsRoot";
import { InvitationsSeen } from "../../Faction/ui/FactionsRoot";
Expand Down Expand Up @@ -151,6 +152,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
Player.exploits.length > 0;

const canOpenSleeves = Player.sleeves.length > 0;
const canOpenGrafting = Player.canAccessGrafting() && Player.city === CityName.NewTokyo;

const canCorporation = !!Player.corporation;
const canGang = !!Player.gang;
Expand Down Expand Up @@ -318,7 +320,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
canOpenFactions && {
key_: Page.Factions,
icon: ContactsIcon,
active: [Page.Factions as Page, Page.Faction].includes(props.page),
active: [Page.Factions, Page.Faction].includes(props.page),
count: invitationsCount,
},
canOpenAugmentations && {
Expand All @@ -328,6 +330,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
},
{ key_: Page.Hacknet, icon: AccountTreeIcon },
canOpenSleeves && { key_: Page.Sleeves, icon: PeopleAltIcon },
canOpenGrafting && { key_: Page.Grafting, icon: BiotechIcon },
]}
/>
<Divider />
Expand All @@ -343,15 +346,15 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
{
key_: Page.City,
icon: LocationCityIcon,
active: [Page.City as Page, Page.Grafting, Page.Location].includes(props.page),
active: [Page.City, Page.Location].includes(props.page),
},
{ key_: Page.Travel, icon: AirplanemodeActiveIcon },
canJob && { key_: Page.Job, icon: WorkIcon },
canStockMarket && { key_: Page.StockMarket, icon: TrendingUpIcon },
canBladeburner && { key_: Page.Bladeburner, icon: FormatBoldIcon },
canCorporation && { key_: Page.Corporation, icon: BusinessIcon },
canGang && { key_: Page.Gang, icon: SportsMmaIcon },
canIPvGO && { key_: Page.Go, icon: BorderInnerSharp },
canIPvGO && { key_: Page.Go, icon: BorderInnerSharpIcon },
]}
/>
<Divider />
Expand Down

0 comments on commit 1525e51

Please sign in to comment.