mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-27 16:37:33 +01:00
63 lines
2.4 KiB
TypeScript
63 lines
2.4 KiB
TypeScript
import React, { useEffect } from "react";
|
|
import Typography from "@mui/material/Typography";
|
|
import { use } from "../../ui/Context";
|
|
import { Exploit } from "../../Exploits/Exploit";
|
|
|
|
const metaBB = "https://bitburner-official.github.io/bitburner-legacy/";
|
|
|
|
const style = {
|
|
width: "1060px",
|
|
height: "800px",
|
|
border: "0px",
|
|
};
|
|
|
|
export function BBCabinetRoot(): React.ReactElement {
|
|
const player = use.Player();
|
|
useEffect(() => {
|
|
window.addEventListener("message", function (this: Window, ev: MessageEvent<boolean>) {
|
|
if (ev.isTrusted && ev.origin == "https://bitburner-official.github.io" && ev.data) {
|
|
player.giveExploit(Exploit.TrueRecursion);
|
|
}
|
|
});
|
|
});
|
|
// prettier-ignore
|
|
const joystick =
|
|
<>
|
|
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> </Typography>
|
|
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> ,'" "', .-. </Typography>
|
|
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> / \ ( ) </Typography>
|
|
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> | | .-. '-' .-. </Typography>
|
|
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> \ / ( ) ( )</Typography>
|
|
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> '.___.' '-' .-. '-'</Typography>
|
|
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> ||| ( ) </Typography>
|
|
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> ||| '-' </Typography>
|
|
</>;
|
|
return (
|
|
<>
|
|
<div
|
|
style={{
|
|
width: "1060px",
|
|
height: "800px",
|
|
padding: "0",
|
|
overflow: "hidden",
|
|
borderColor: "white",
|
|
borderStyle: "solid",
|
|
borderWidth: "5px",
|
|
}}
|
|
>
|
|
<iframe src={metaBB} style={style} />
|
|
</div>
|
|
<div
|
|
style={{
|
|
width: "1060px",
|
|
borderColor: "white",
|
|
borderStyle: "solid",
|
|
borderWidth: "5px",
|
|
}}
|
|
>
|
|
{joystick}
|
|
</div>
|
|
</>
|
|
);
|
|
}
|