mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
UI: Prevent ending BNs through reuse of Bladeburner UI event handler (#2574)
This commit is contained in:
@@ -9,6 +9,7 @@ import { Page } from "../../ui/Router";
|
||||
import { CorruptibleText } from "../../ui/React/CorruptibleText";
|
||||
import { blackOpsArray } from "../data/BlackOperations";
|
||||
import { finishBitNode } from "../../BitNode/BitNodeUtils";
|
||||
import { Player } from "@player";
|
||||
|
||||
interface BlackOpPageProps {
|
||||
bladeburner: Bladeburner;
|
||||
@@ -38,6 +39,9 @@ export function BlackOpPage({ bladeburner }: BlackOpPageProps): React.ReactEleme
|
||||
<Button
|
||||
sx={{ my: 1, p: 1 }}
|
||||
onClick={() => {
|
||||
if (!Player.bladeburner || Player.bladeburner.numBlackOpsComplete < blackOpsArray.length) {
|
||||
return;
|
||||
}
|
||||
finishBitNode();
|
||||
Router.toPage(Page.BitVerse, { flume: false, quick: false });
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user