2022-03-16 19:34:05 +01:00
|
|
|
import React, { useEffect } from "react";
|
2022-03-11 21:19:10 +01:00
|
|
|
import Typography from "@mui/material/Typography";
|
2022-03-16 19:34:05 +01:00
|
|
|
import { use } from "../../ui/Context";
|
|
|
|
import { Exploit } from "../../Exploits/Exploit";
|
2022-03-11 21:19:10 +01:00
|
|
|
|
|
|
|
const metaBB = "https://bitburner-official.github.io/bitburner-legacy/";
|
|
|
|
|
|
|
|
const style = {
|
|
|
|
width: "1060px",
|
|
|
|
height: "800px",
|
|
|
|
border: "0px",
|
2022-07-16 05:34:27 +02:00
|
|
|
};
|
2022-03-11 21:19:10 +01:00
|
|
|
|
|
|
|
export function BBCabinetRoot(): React.ReactElement {
|
2022-03-16 19:34:05 +01:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2022-03-11 21:19:10 +01:00
|
|
|
// 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>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|