mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 11:27:04 +02:00
UI: Add grafting to sidebar (#1809)
This commit is contained in:
@@ -13,7 +13,7 @@ import ListItemIcon from "@mui/material/ListItemIcon";
|
|||||||
import ListItemText from "@mui/material/ListItemText";
|
import ListItemText from "@mui/material/ListItemText";
|
||||||
import Typography from "@mui/material/Typography";
|
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 LastPageIcon from "@mui/icons-material/LastPage"; // Terminal
|
||||||
import CreateIcon from "@mui/icons-material/Create"; // Create Script
|
import CreateIcon from "@mui/icons-material/Create"; // Create Script
|
||||||
import StorageIcon from "@mui/icons-material/Storage"; // Active Scripts
|
import StorageIcon from "@mui/icons-material/Storage"; // Active Scripts
|
||||||
@@ -33,12 +33,13 @@ import SportsMmaIcon from "@mui/icons-material/SportsMma"; // Gang
|
|||||||
import CheckIcon from "@mui/icons-material/Check"; // Milestones
|
import CheckIcon from "@mui/icons-material/Check"; // Milestones
|
||||||
import HelpIcon from "@mui/icons-material/Help"; // Tutorial
|
import HelpIcon from "@mui/icons-material/Help"; // Tutorial
|
||||||
import SettingsIcon from "@mui/icons-material/Settings"; // options
|
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 EmojiEventsIcon from "@mui/icons-material/EmojiEvents"; // Achievements
|
||||||
import AccountBoxIcon from "@mui/icons-material/AccountBox";
|
import AccountBoxIcon from "@mui/icons-material/AccountBox"; // Character
|
||||||
import PublicIcon from "@mui/icons-material/Public";
|
import PublicIcon from "@mui/icons-material/Public"; // World
|
||||||
import LiveHelpIcon from "@mui/icons-material/LiveHelp";
|
import LiveHelpIcon from "@mui/icons-material/LiveHelp"; // Help
|
||||||
import BorderInnerSharp from "@mui/icons-material/BorderInnerSharp";
|
import BorderInnerSharpIcon from "@mui/icons-material/BorderInnerSharp"; // IPvGO
|
||||||
|
import BiotechIcon from "@mui/icons-material/Biotech"; // Grafting
|
||||||
|
|
||||||
import { Router } from "../../ui/GameRoot";
|
import { Router } from "../../ui/GameRoot";
|
||||||
import { Page, isSimplePage } from "../../ui/Router";
|
import { Page, isSimplePage } from "../../ui/Router";
|
||||||
@@ -48,7 +49,7 @@ import { CONSTANTS } from "../../Constants";
|
|||||||
import { iTutorialSteps, iTutorialNextStep, ITutorial } from "../../InteractiveTutorial";
|
import { iTutorialSteps, iTutorialNextStep, ITutorial } from "../../InteractiveTutorial";
|
||||||
import { getAvailableCreatePrograms } from "../../Programs/ProgramHelpers";
|
import { getAvailableCreatePrograms } from "../../Programs/ProgramHelpers";
|
||||||
import { Settings } from "../../Settings/Settings";
|
import { Settings } from "../../Settings/Settings";
|
||||||
import { AugmentationName } from "@enums";
|
import { AugmentationName, CityName } from "@enums";
|
||||||
|
|
||||||
import { ProgramsSeen } from "../../Programs/ui/ProgramsRoot";
|
import { ProgramsSeen } from "../../Programs/ui/ProgramsRoot";
|
||||||
import { InvitationsSeen } from "../../Faction/ui/FactionsRoot";
|
import { InvitationsSeen } from "../../Faction/ui/FactionsRoot";
|
||||||
@@ -151,6 +152,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
|
|||||||
Player.exploits.length > 0;
|
Player.exploits.length > 0;
|
||||||
|
|
||||||
const canOpenSleeves = Player.sleeves.length > 0;
|
const canOpenSleeves = Player.sleeves.length > 0;
|
||||||
|
const canOpenGrafting = Player.canAccessGrafting() && Player.city === CityName.NewTokyo;
|
||||||
|
|
||||||
const canCorporation = !!Player.corporation;
|
const canCorporation = !!Player.corporation;
|
||||||
const canGang = !!Player.gang;
|
const canGang = !!Player.gang;
|
||||||
@@ -318,7 +320,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
|
|||||||
canOpenFactions && {
|
canOpenFactions && {
|
||||||
key_: Page.Factions,
|
key_: Page.Factions,
|
||||||
icon: ContactsIcon,
|
icon: ContactsIcon,
|
||||||
active: [Page.Factions as Page, Page.Faction].includes(props.page),
|
active: [Page.Factions, Page.Faction].includes(props.page),
|
||||||
count: invitationsCount,
|
count: invitationsCount,
|
||||||
},
|
},
|
||||||
canOpenAugmentations && {
|
canOpenAugmentations && {
|
||||||
@@ -328,6 +330,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
|
|||||||
},
|
},
|
||||||
{ key_: Page.Hacknet, icon: AccountTreeIcon },
|
{ key_: Page.Hacknet, icon: AccountTreeIcon },
|
||||||
canOpenSleeves && { key_: Page.Sleeves, icon: PeopleAltIcon },
|
canOpenSleeves && { key_: Page.Sleeves, icon: PeopleAltIcon },
|
||||||
|
canOpenGrafting && { key_: Page.Grafting, icon: BiotechIcon },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Divider />
|
<Divider />
|
||||||
@@ -343,7 +346,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
|
|||||||
{
|
{
|
||||||
key_: Page.City,
|
key_: Page.City,
|
||||||
icon: LocationCityIcon,
|
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 },
|
{ key_: Page.Travel, icon: AirplanemodeActiveIcon },
|
||||||
canJob && { key_: Page.Job, icon: WorkIcon },
|
canJob && { key_: Page.Job, icon: WorkIcon },
|
||||||
@@ -351,7 +354,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
|
|||||||
canBladeburner && { key_: Page.Bladeburner, icon: FormatBoldIcon },
|
canBladeburner && { key_: Page.Bladeburner, icon: FormatBoldIcon },
|
||||||
canCorporation && { key_: Page.Corporation, icon: BusinessIcon },
|
canCorporation && { key_: Page.Corporation, icon: BusinessIcon },
|
||||||
canGang && { key_: Page.Gang, icon: SportsMmaIcon },
|
canGang && { key_: Page.Gang, icon: SportsMmaIcon },
|
||||||
canIPvGO && { key_: Page.Go, icon: BorderInnerSharp },
|
canIPvGO && { key_: Page.Go, icon: BorderInnerSharpIcon },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|||||||
Reference in New Issue
Block a user