diff --git a/src/Arcade/ui/ArcadeRoot.tsx b/src/Arcade/ui/ArcadeRoot.tsx
new file mode 100644
index 000000000..efb1f92d9
--- /dev/null
+++ b/src/Arcade/ui/ArcadeRoot.tsx
@@ -0,0 +1,43 @@
+import React, { useState } from "react";
+import { BBCabinetRoot } from "./BBCabinet";
+
+import Button from "@mui/material/Button";
+import { use } from "../../ui/Context";
+import { AlertEvents } from "../../ui/React/AlertManager";
+
+enum Page {
+ None,
+ Megabyteburner2000,
+}
+
+export function ArcadeRoot(): React.ReactElement {
+ const player = use.Player();
+ const [page, setPage] = useState(Page.None);
+
+ function mbBurner2000(): void {
+ if (player.sourceFileLvl(1) === 0) {
+ AlertEvents.emit("This machine is broken.");
+ } else {
+ setPage(Page.Megabyteburner2000);
+ }
+ }
+
+ if (page === Page.None) {
+ return (
+ <>
+
+ >
+ );
+ }
+ let currentGame = <>>;
+ switch (page) {
+ case Page.Megabyteburner2000:
+ currentGame = ;
+ }
+ return (
+ <>
+
+ {currentGame}
+ >
+ );
+}
diff --git a/src/Arcade/ui/BBCabinet.tsx b/src/Arcade/ui/BBCabinet.tsx
new file mode 100644
index 000000000..d88d7b61b
--- /dev/null
+++ b/src/Arcade/ui/BBCabinet.tsx
@@ -0,0 +1,52 @@
+import React from "react";
+import Typography from "@mui/material/Typography";
+
+const metaBB = "https://bitburner-official.github.io/bitburner-legacy/";
+
+const style = {
+ width: "1060px",
+ height: "800px",
+ border: "0px",
+} as any;
+
+export function BBCabinetRoot(): React.ReactElement {
+ // prettier-ignore
+ const joystick =
+ <>
+
+ ,'" "', .-.
+ / \ ( )
+ | | .-. '-' .-.
+ \ / ( ) ( )
+ '.___.' '-' .-. '-'
+ ||| ( )
+ ||| '-'
+ >;
+ return (
+ <>
+
+
+
+
+ {joystick}
+
+ >
+ );
+}
diff --git a/src/Locations/Locations.ts b/src/Locations/Locations.ts
index 725574767..def929474 100644
--- a/src/Locations/Locations.ts
+++ b/src/Locations/Locations.ts
@@ -127,10 +127,10 @@ Cities[CityName.NewTokyo].asciiArt = `
o
\\
- \\ [defcomm]
+ [arcade] E [defcomm]
\\
o--x---A--x--o [travel agency]
- 7 8 10 G
+ 7 8 10 H
[vitalife] o 12 [global pharmaceuticals]
|
o--D-x----x-------x-C-+--------x--x-B-x---x-o
@@ -141,14 +141,14 @@ Cities[CityName.NewTokyo].asciiArt = `
\\
[hospital] o 15 [world stock exchange]
|
- o--x--E--x-----x-----x---+---x----x--H--x-o
+ o--x--F--x-----x-----x---+---x----x--I--x-o
|
|
o 17
- F [the slums]
+ G [the slums]
`;
Cities[CityName.Sector12].asciiArt = `
78 o 97
diff --git a/src/Locations/data/LocationNames.ts b/src/Locations/data/LocationNames.ts
index e64b96b12..f3b4f96e5 100644
--- a/src/Locations/data/LocationNames.ts
+++ b/src/Locations/data/LocationNames.ts
@@ -54,6 +54,7 @@ export enum LocationName {
NewTokyoGlobalPharmaceuticals = "Global Pharmaceuticals",
NewTokyoNoodleBar = "Noodle Bar",
NewTokyoVitaLife = "VitaLife",
+ NewTokyoArcade = "Arcade",
// Ishima
IshimaNovaMedical = "Nova Medical",
diff --git a/src/Locations/data/LocationsMetadata.ts b/src/Locations/data/LocationsMetadata.ts
index dacd09172..e06ee66fe 100644
--- a/src/Locations/data/LocationsMetadata.ts
+++ b/src/Locations/data/LocationsMetadata.ts
@@ -215,6 +215,11 @@ export const LocationsMetadata: IConstructorParams[] = [
name: LocationName.NewTokyoVitaLife,
types: [LocationType.Company, LocationType.Special],
},
+ {
+ city: CityName.NewTokyo,
+ name: LocationName.NewTokyoArcade,
+ types: [LocationType.Special],
+ },
{
city: CityName.Sector12,
infiltrationData: {
diff --git a/src/Locations/ui/City.tsx b/src/Locations/ui/City.tsx
index 6cee21071..1653e4b41 100644
--- a/src/Locations/ui/City.tsx
+++ b/src/Locations/ui/City.tsx
@@ -34,10 +34,9 @@ const useStyles = makeStyles((theme: Theme) =>
padding: "0px",
cursor: "pointer",
},
- })
+ }),
);
-
function toLocation(router: IRouter, location: Location): void {
if (location.name === LocationName.TravelAgency) {
router.toTravel();
@@ -132,12 +131,14 @@ function ASCIICity(props: IProps): React.ReactElement {
const elems: JSX.Element[] = [];
const lines = props.city.asciiArt.split("\n");
+ let i = 0;
for (const line of lines) {
elems.push(
-
+
{lineElems(line)}
,
);
+ i++;
}
return <>{elems}>;
diff --git a/src/Locations/ui/SpecialLocation.tsx b/src/Locations/ui/SpecialLocation.tsx
index bcd21acb5..5e14dc1fe 100644
--- a/src/Locations/ui/SpecialLocation.tsx
+++ b/src/Locations/ui/SpecialLocation.tsx
@@ -32,6 +32,7 @@ import { CorruptableText } from "../../ui/React/CorruptableText";
import { HacknetNode } from "../../Hacknet/HacknetNode";
import { HacknetServer } from "../../Hacknet/HacknetServer";
import { GetServer } from "../../Server/AllServers";
+import { ArcadeRoot } from "../../Arcade/ui/ArcadeRoot";
type IProps = {
loc: Location;
@@ -81,7 +82,12 @@ export function SpecialLocation(props: IProps): React.ReactElement {
return <>>;
}
const text = inBladeburner ? "Enter Bladeburner Headquarters" : "Apply to Bladeburner Division";
- return <>
>;
+ return (
+ <>
+
+
+ >
+ );
}
function renderNoodleBar(): React.ReactElement {
@@ -311,6 +317,9 @@ export function SpecialLocation(props: IProps): React.ReactElement {
case LocationName.IshimaGlitch: {
return renderGlitch();
}
+ case LocationName.NewTokyoArcade: {
+ return ;
+ }
default:
console.error(`Location ${props.loc.name} doesn't have any special properties`);
return <>>;
diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx
index 12484e7f0..40790ab3e 100644
--- a/src/ui/GameRoot.tsx
+++ b/src/ui/GameRoot.tsx
@@ -110,107 +110,45 @@ const useStyles = makeStyles((theme: Theme) =>
}),
);
+const uninitialized = (): any => {
+ throw new Error("Router called before initialization");
+};
+
export let Router: IRouter = {
isInitialized: false,
- page: () => {
- throw new Error("Router called before initialization");
- },
- allowRouting: () => {
- throw new Error("Router called before initialization");
- },
- toActiveScripts: () => {
- throw new Error("Router called before initialization");
- },
- toAugmentations: () => {
- throw new Error("Router called before initialization");
- },
- toBitVerse: () => {
- throw new Error("Router called before initialization");
- },
- toBladeburner: () => {
- throw new Error("Router called before initialization");
- },
- toStats: () => {
- throw new Error("Router called before initialization");
- },
- toCity: () => {
- throw new Error("Router called before initialization");
- },
- toCorporation: () => {
- throw new Error("Router called before initialization");
- },
- toCreateProgram: () => {
- throw new Error("Router called before initialization");
- },
- toDevMenu: () => {
- throw new Error("Router called before initialization");
- },
- toFaction: () => {
- throw new Error("Router called before initialization");
- },
- toFactions: () => {
- throw new Error("Router called before initialization");
- },
- toGameOptions: () => {
- throw new Error("Router called before initialization");
- },
- toGang: () => {
- throw new Error("Router called before initialization");
- },
- toHacknetNodes: () => {
- throw new Error("Router called before initialization");
- },
- toInfiltration: () => {
- throw new Error("Router called before initialization");
- },
- toJob: () => {
- throw new Error("Router called before initialization");
- },
- toMilestones: () => {
- throw new Error("Router called before initialization");
- },
- toResleeves: () => {
- throw new Error("Router called before initialization");
- },
- toScriptEditor: () => {
- throw new Error("Router called before initialization");
- },
- toSleeves: () => {
- throw new Error("Router called before initialization");
- },
- toStockMarket: () => {
- throw new Error("Router called before initialization");
- },
- toTerminal: () => {
- throw new Error("Router called before initialization");
- },
- toTravel: () => {
- throw new Error("Router called before initialization");
- },
- toTutorial: () => {
- throw new Error("Router called before initialization");
- },
- toWork: () => {
- throw new Error("Router called before initialization");
- },
- toBladeburnerCinematic: () => {
- throw new Error("Router called before initialization");
- },
- toLocation: () => {
- throw new Error("Router called before initialization");
- },
- toStaneksGift: () => {
- throw new Error("Router called before initialization");
- },
- toAchievements: () => {
- throw new Error("Router called before initialization");
- },
- toThemeBrowser: () => {
- throw new Error("Router called before initialization");
- },
- toImportSave: () => {
- throw new Error("Router called before initialization");
- },
+ page: uninitialized,
+ allowRouting: uninitialized,
+ toActiveScripts: uninitialized,
+ toAugmentations: uninitialized,
+ toBitVerse: uninitialized,
+ toBladeburner: uninitialized,
+ toStats: uninitialized,
+ toCity: uninitialized,
+ toCorporation: uninitialized,
+ toCreateProgram: uninitialized,
+ toDevMenu: uninitialized,
+ toFaction: uninitialized,
+ toFactions: uninitialized,
+ toGameOptions: uninitialized,
+ toGang: uninitialized,
+ toHacknetNodes: uninitialized,
+ toInfiltration: uninitialized,
+ toJob: uninitialized,
+ toMilestones: uninitialized,
+ toResleeves: uninitialized,
+ toScriptEditor: uninitialized,
+ toSleeves: uninitialized,
+ toStockMarket: uninitialized,
+ toTerminal: uninitialized,
+ toTravel: uninitialized,
+ toTutorial: uninitialized,
+ toWork: uninitialized,
+ toBladeburnerCinematic: uninitialized,
+ toLocation: uninitialized,
+ toStaneksGift: uninitialized,
+ toAchievements: uninitialized,
+ toThemeBrowser: uninitialized,
+ toImportSave: uninitialized,
};
function determineStartPage(player: IPlayer): Page {
@@ -346,12 +284,11 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
},
};
-
useEffect(() => {
// Wrap Router navigate functions to be able to disable the execution
- _functions(Router).
- filter((fnName) => fnName.startsWith('to')).
- forEach((fnName) => {
+ _functions(Router)
+ .filter((fnName) => fnName.startsWith("to"))
+ .forEach((fnName) => {
// @ts-ignore - tslint does not like this, couldn't find a way to make it cooperate
Router[fnName] = _wrap(Router[fnName], (func, ...args) => {
if (!allowRoutingCalls) {
@@ -360,7 +297,7 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
return;
}
- // Call the function normally
+ // Call the function normally
return func(...args);
});
});
@@ -568,13 +505,7 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
break;
}
case Page.ImportSave: {
- mainPage = (
-
- );
+ mainPage = ;
withSidebar = false;
withPopups = false;
bypassGame = true;