UI: Prevent ending BNs through reuse of Bladeburner UI event handler (#2574)

This commit is contained in:
catloversg
2026-03-17 01:55:05 +07:00
committed by GitHub
parent 3b372e9cad
commit 17a7b2efac

View File

@@ -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 });
}}