bitburner-src/src/DevMenu.tsx

71 lines
2.7 KiB
TypeScript
Raw Normal View History

2021-09-10 22:57:05 +02:00
import { IPlayer } from "./PersonObjects/IPlayer";
import { Bladeburner } from "./Bladeburner/Bladeburner";
import { IEngine } from "./IEngine";
2021-09-18 01:43:08 +02:00
import { IRouter } from "./ui/Router";
2021-10-08 09:16:51 +02:00
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
2021-09-10 22:57:05 +02:00
2022-01-04 18:19:27 +01:00
import React, { useEffect } from "react";
2021-09-10 22:57:05 +02:00
2021-09-14 02:37:35 +02:00
import { General } from "./DevMenu/ui/General";
import { Stats } from "./DevMenu/ui/Stats";
import { Factions } from "./DevMenu/ui/Factions";
import { Augmentations } from "./DevMenu/ui/Augmentations";
import { SourceFiles } from "./DevMenu/ui/SourceFiles";
import { Programs } from "./DevMenu/ui/Programs";
import { Servers } from "./DevMenu/ui/Servers";
import { Companies } from "./DevMenu/ui/Companies";
import { Bladeburner as BladeburnerElem } from "./DevMenu/ui/Bladeburner";
import { Gang } from "./DevMenu/ui/Gang";
import { Corporation } from "./DevMenu/ui/Corporation";
import { CodingContracts } from "./DevMenu/ui/CodingContracts";
import { StockMarket } from "./DevMenu/ui/StockMarket";
import { Sleeves } from "./DevMenu/ui/Sleeves";
2021-10-08 09:16:51 +02:00
import { Stanek } from "./DevMenu/ui/Stanek";
2021-09-14 02:37:35 +02:00
import { TimeSkip } from "./DevMenu/ui/TimeSkip";
2022-01-08 11:45:00 +01:00
import { Achievements } from "./DevMenu/ui/Achievements";
import { Entropy } from "./DevMenu/ui/Entropy";
2021-10-01 22:22:33 +02:00
import Typography from "@mui/material/Typography";
2022-01-04 18:19:27 +01:00
import { Exploit } from "./Exploits/Exploit";
2021-09-10 22:57:05 +02:00
interface IProps {
player: IPlayer;
engine: IEngine;
2021-09-18 01:43:08 +02:00
router: IRouter;
2021-09-10 22:57:05 +02:00
}
export function DevMenuRoot(props: IProps): React.ReactElement {
2022-01-04 18:19:27 +01:00
useEffect(() => {
props.player.giveExploit(Exploit.YoureNotMeantToAccessThis);
}, []);
2021-09-10 22:57:05 +02:00
return (
2021-09-18 03:30:02 +02:00
<>
2021-10-01 22:22:33 +02:00
<Typography>Development Menu - Only meant to be used for testing/debugging</Typography>
2021-09-18 03:30:02 +02:00
<General player={props.player} router={props.router} />
<Stats player={props.player} />
<Factions player={props.player} />
<Augmentations player={props.player} />
<SourceFiles player={props.player} />
<Programs player={props.player} />
<Servers />
<Companies />
2021-09-13 18:44:46 +02:00
2021-09-18 03:30:02 +02:00
{props.player.bladeburner instanceof Bladeburner && <BladeburnerElem player={props.player} />}
2021-09-13 18:44:46 +02:00
2021-09-18 03:30:02 +02:00
{props.player.inGang() && <Gang player={props.player} />}
2021-09-13 18:44:46 +02:00
2021-09-18 03:30:02 +02:00
{props.player.hasCorporation() && <Corporation player={props.player} />}
2021-09-13 18:44:46 +02:00
2021-09-18 03:30:02 +02:00
<CodingContracts />
2021-09-10 22:57:05 +02:00
2021-09-18 03:30:02 +02:00
{props.player.hasWseAccount && <StockMarket />}
2021-09-13 18:44:46 +02:00
2021-09-18 03:30:02 +02:00
{props.player.sleeves.length > 0 && <Sleeves player={props.player} />}
2021-10-08 09:16:51 +02:00
{props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1) && <Stanek />}
2021-09-13 18:44:46 +02:00
2021-09-18 03:30:02 +02:00
<TimeSkip player={props.player} engine={props.engine} />
2022-01-08 11:45:00 +01:00
<Achievements player={props.player} engine={props.engine} />
<Entropy player={props.player} engine={props.engine} />
2021-09-18 03:30:02 +02:00
</>
2021-09-10 22:57:05 +02:00
);
}