diff --git a/src/DevMenu/ui/General.tsx b/src/DevMenu/ui/General.tsx index c6a2532d7..480943fa1 100644 --- a/src/DevMenu/ui/General.tsx +++ b/src/DevMenu/ui/General.tsx @@ -10,6 +10,10 @@ import Button from "@mui/material/Button"; import { Money } from "../../ui/React/Money"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { IRouter } from "../../ui/Router"; +import { MenuItem, SelectChangeEvent, TextField, Select } from "@mui/material"; +import { Bladeburner } from "../../Bladeburner/Bladeburner"; +import { GangConstants } from "../../Gang/data/Constants"; +import { FactionNames } from "../../Faction/data/FactionNames"; interface IProps { player: IPlayer; @@ -18,6 +22,8 @@ interface IProps { export function General(props: IProps): React.ReactElement { const [error, setError] = useState(false); + const [corporationName, setCorporationName] = useState(""); + const [gangFaction, setGangFaction] = useState(""); function addMoney(n: number) { return function () { @@ -45,8 +51,25 @@ export function General(props: IProps): React.ReactElement { props.router.toBitVerse(false, false); } + function createCorporation(): void { + props.player.startCorporation(corporationName); + } + + function joinBladeburner(): void { + props.player.bladeburner = new Bladeburner(props.player); + } + + function startGang(): void { + const isHacking = gangFaction === FactionNames.NiteSec || gangFaction === FactionNames.TheBlackHand; + props.player.startGang(gangFaction, isHacking); + } + + function setGangFactionDropdown(event: SelectChangeEvent): void { + setGangFaction(event.target.value); + } + useEffect(() => { - if (error) throw new ReferenceError('Manually thrown error'); + if (error) throw new ReferenceError("Manually thrown error"); }, [error]); return ( @@ -82,6 +105,22 @@ export function General(props: IProps): React.ReactElement {
+ Corporation Name: + setCorporationName(x.target.value)} /> + +
+ Gang Faction: + + +
+ +