Skip to content

Commit

Permalink
Bladeburner final op no longer directly sends you to the bitverse but…
Browse files Browse the repository at this point in the history
… instead makes a button appear that sends you there
  • Loading branch information
Olivier Gagnon committed May 26, 2022
1 parent 4e10e19 commit f2721fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
8 changes: 0 additions & 8 deletions src/Bladeburner/Bladeburner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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"]) {
Expand Down
13 changes: 12 additions & 1 deletion src/Bladeburner/ui/BlackOpPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ 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;
player: IPlayer;
}

export function BlackOpPage(props: IProps): React.ReactElement {
const router = use.Router();
return (
<>
<Typography>
Expand All @@ -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.
</Typography>
<BlackOpList bladeburner={props.bladeburner} player={props.player} />
{props.bladeburner.blackops[BlackOperationNames.OperationDaedalus] ? (
<Button sx={{ my: 1, p: 1 }} onClick={() => router.toBitVerse(false, false)}>
<CorruptableText content="Destroy w0rld_d34mon"></CorruptableText>
</Button>
) : (
<BlackOpList bladeburner={props.bladeburner} player={props.player} />
)}
</>
);
}

0 comments on commit f2721fe

Please sign in to comment.