mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-09 14:57:33 +01:00
Add a Cancel to exit out of Infiltrations
fixes #1904 doesnt current impose a penalty for canceling but i can add that in easily if wanted
This commit is contained in:
parent
7107dd682c
commit
604211112f
@ -1,6 +1,7 @@
|
|||||||
import { use } from "../../ui/Context";
|
import { use } from "../../ui/Context";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import Grid from "@mui/material/Grid";
|
import Grid from "@mui/material/Grid";
|
||||||
|
import Button from "@mui/material/Button";
|
||||||
import { Countdown } from "./Countdown";
|
import { Countdown } from "./Countdown";
|
||||||
import { BracketGame } from "./BracketGame";
|
import { BracketGame } from "./BracketGame";
|
||||||
import { SlashGame } from "./SlashGame";
|
import { SlashGame } from "./SlashGame";
|
||||||
@ -98,6 +99,11 @@ export function Game(props: IProps): React.ReactElement {
|
|||||||
setupNextGame();
|
setupNextGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cancel(): void {
|
||||||
|
router.toCity();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let stageComponent: React.ReactNode;
|
let stageComponent: React.ReactNode;
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case Stage.Countdown:
|
case Stage.Countdown:
|
||||||
@ -132,6 +138,9 @@ export function Game(props: IProps): React.ReactElement {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Grid container spacing={3}>
|
<Grid container spacing={3}>
|
||||||
|
<Grid item xs={3}>
|
||||||
|
<Button onClick={cancel}>Cancel</Button>
|
||||||
|
</Grid>
|
||||||
<Grid item xs={3}>
|
<Grid item xs={3}>
|
||||||
<Typography>
|
<Typography>
|
||||||
Level: {level} / {props.MaxLevel}
|
Level: {level} / {props.MaxLevel}
|
||||||
|
Loading…
Reference in New Issue
Block a user