forked from bitburner-official/bitburner-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDevMenu.tsx
70 lines (57 loc) · 2.56 KB
/
DevMenu.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import React, { useEffect } from "react";
import Typography from "@mui/material/Typography";
import { Player } from "@player";
import { AugmentationName } from "@enums";
import { General } from "./DevMenu/ui/General";
import { TimeSkip } from "./DevMenu/ui/TimeSkip";
import { StatsDev } from "./DevMenu/ui/StatsDev";
import { FactionsDev } from "./DevMenu/ui/FactionsDev";
import { AugmentationsDev } from "./DevMenu/ui/AugmentationsDev";
import { SourceFilesDev } from "./DevMenu/ui/SourceFilesDev";
import { ProgramsDev } from "./DevMenu/ui/ProgramsDev";
import { ServersDev } from "./DevMenu/ui/ServersDev";
import { CompaniesDev } from "./DevMenu/ui/CompaniesDev";
import { BladeburnerDev } from "./DevMenu/ui/BladeburnerDev";
import { GangDev } from "./DevMenu/ui/GangDev";
import { CorporationDev } from "./DevMenu/ui/CorporationDev";
import { CodingContractsDev } from "./DevMenu/ui/CodingContractsDev";
import { StockMarketDev } from "./DevMenu/ui/StockMarketDev";
import { SleevesDev } from "./DevMenu/ui/SleevesDev";
import { StanekDev } from "./DevMenu/ui/StanekDev";
import { SaveFileDev } from "./DevMenu/ui/SaveFileDev";
import { AchievementsDev } from "./DevMenu/ui/AchievementsDev";
import { EntropyDev } from "./DevMenu/ui/EntropyDev";
import { Exploit } from "./Exploits/Exploit";
import { useRerender } from "./ui/React/hooks";
export function DevMenuRoot(): React.ReactElement {
useEffect(() => {
Player.giveExploit(Exploit.YoureNotMeantToAccessThis);
}, []);
// Pass rerender to certain subpages in case certain tabs are now valid/invalid due to changes made on those pages
// Rerender periodically in case game state changes (e.g. player starts gang or buys wse account through a script)
const rerender = useRerender(400);
return (
<>
<Typography>Development Menu - Only meant to be used for testing/debugging</Typography>
<General parentRerender={rerender} />
<StatsDev />
<FactionsDev />
<AugmentationsDev />
<SourceFilesDev parentRerender={rerender} />
<ProgramsDev />
<ServersDev />
<CompaniesDev />
{Player.bladeburner && <BladeburnerDev bladeburner={Player.bladeburner} />}
{Player.gang && <GangDev />}
{Player.corporation && <CorporationDev />}
<CodingContractsDev />
{Player.hasWseAccount && <StockMarketDev />}
{Player.sleeves.length > 0 && <SleevesDev />}
{Player.augmentations.some((aug) => aug.name === AugmentationName.StaneksGift1) && <StanekDev />}
<TimeSkip />
<AchievementsDev />
<EntropyDev />
<SaveFileDev />
</>
);
}