From f2721fefd29a4403e599bc894b520fbae5092a49 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Thu, 26 May 2022 12:59:05 -0400 Subject: [PATCH] Bladeburner final op no longer directly sends you to the bitverse but instead makes a button appear that sends you there --- src/Bladeburner/Bladeburner.tsx | 8 -------- src/Bladeburner/ui/BlackOpPage.tsx | 13 ++++++++++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Bladeburner/Bladeburner.tsx b/src/Bladeburner/Bladeburner.tsx index 191a3104d5..59ed0432d2 100644 --- a/src/Bladeburner/Bladeburner.tsx +++ b/src/Bladeburner/Bladeburner.tsx @@ -1686,9 +1686,6 @@ export class Bladeburner implements IBladeburner { // Operation Daedalus if (action == null) { throw new Error("Failed to get BlackOperation Object for: " + this.action.name); - } else if (action.name === BlackOperationNames.OperationDaedalus && this.blackops[action.name]) { - this.resetAction(); - router.toBitVerse(false, false); } else if (this.action.type != ActionTypes["BlackOperation"] && this.action.type != ActionTypes["BlackOp"]) { this.startAction(player, this.action); // Repeat action } @@ -1991,11 +1988,6 @@ export class Bladeburner implements IBladeburner { // Edge race condition when the engine checks the processing counters and attempts to route before the router is initialized. if (!router.isInitialized) return; - // Edge case condition...if Operation Daedalus is complete trigger the BitNode - if (router.page() !== Page.BitVerse && this.blackops.hasOwnProperty(BlackOperationNames.OperationDaedalus)) { - return router.toBitVerse(false, false); - } - // If the Player starts doing some other actions, set action to idle and alert if (!player.hasAugmentation(AugmentationNames.BladesSimulacrum, true) && player.isWorking) { if (this.action.type !== ActionTypes["Idle"]) { diff --git a/src/Bladeburner/ui/BlackOpPage.tsx b/src/Bladeburner/ui/BlackOpPage.tsx index c092beb14d..8e669f0634 100644 --- a/src/Bladeburner/ui/BlackOpPage.tsx +++ b/src/Bladeburner/ui/BlackOpPage.tsx @@ -4,6 +4,10 @@ import { IBladeburner } from "../IBladeburner"; import { IPlayer } from "../../PersonObjects/IPlayer"; import Typography from "@mui/material/Typography"; import { FactionNames } from "../../Faction/data/FactionNames"; +import { use } from "../../ui/Context"; +import { BlackOperationNames } from "../data/BlackOperationNames"; +import { Button } from "@mui/material"; +import { CorruptableText } from "../../ui/React/CorruptableText"; interface IProps { bladeburner: IBladeburner; @@ -11,6 +15,7 @@ interface IProps { } export function BlackOpPage(props: IProps): React.ReactElement { + const router = use.Router(); return ( <> @@ -27,7 +32,13 @@ export function BlackOpPage(props: IProps): React.ReactElement { Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses. - + {props.bladeburner.blackops[BlackOperationNames.OperationDaedalus] ? ( + + ) : ( + + )} ); }