updated node starting messages actually show up ()

This commit is contained in:
Mughur 2023-02-27 21:46:01 +02:00 committed by GitHub
parent 5cef60cd21
commit 9d504b0dfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 5 deletions

@ -257,6 +257,11 @@ export function prestigeSourceFile(flume: boolean): void {
);
}
// BitNode 6: Bladeburners and BitNode 7: Bladeburners 2079
if (Player.bitNodeN === 6 || Player.bitNodeN === 7) {
dialogBoxCreate("NSA would like to have a word with you once you're ready.");
}
// BitNode 8: Ghost of Wall Street
if (Player.bitNodeN === 8) {
Player.money = BitNode8StartingMoney;
@ -266,9 +271,16 @@ export function prestigeSourceFile(flume: boolean): void {
Player.hasTixApiAccess = true;
}
// Bit Node 10: Digital Carbon
// BitNode 10: Digital Carbon
if (Player.bitNodeN === 10) {
dialogBoxCreate("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!");
dialogBoxCreate(
"Seek out The Covenant if you'd like to purchase a new sleeve or two! And see what VitaLife in New Tokyo has to offer for you",
);
}
// BitNode 12: Digital Carbon
if (Player.bitNodeN === 12 && Player.sourceFileLvl(10) > 100) {
dialogBoxCreate("Saynt_Garmo is watching you");
}
if (Player.bitNodeN === 13) {

@ -1,13 +1,13 @@
/** Implementation for what happens when you destroy a BitNode */
import React from "react";
import { Player } from "@player";
import { prestigeSourceFile } from "./Prestige";
import { PlayerOwnedSourceFile } from "./SourceFile/PlayerOwnedSourceFile";
import { SourceFiles } from "./SourceFile/SourceFiles";
import { dialogBoxCreate } from "./ui/React/DialogBox";
import { Router } from "./ui/GameRoot";
import { Page } from "./ui/Router";
import { Engine } from "./engine";
function giveSourceFile(bitNodeNumber: number): void {
const sourceFileKey = "SourceFile" + bitNodeNumber.toString();
@ -73,5 +73,5 @@ export function enterBitNode(flume: boolean, destroyedBitNode: number, newBitNod
} else {
Router.toPage(Page.Terminal);
}
prestigeSourceFile(flume);
Engine.nodeTransfer = flume;
}

@ -44,11 +44,13 @@ import React from "react";
import { setupUncaughtPromiseHandler } from "./UncaughtPromiseHandler";
import { Button, Typography } from "@mui/material";
import { SnackbarEvents, ToastVariant } from "./ui/React/Snackbar";
import { prestigeSourceFile } from "./Prestige";
/** Game engine. Handles the main game loop. */
const Engine: {
_lastUpdate: number;
updateGame: (numCycles?: number) => void;
nodeTransfer: boolean | undefined;
Counters: {
[key: string]: number | undefined;
autoSaveCounter: number;
@ -72,8 +74,12 @@ const Engine: {
} = {
// Time variables (milliseconds unix epoch time)
_lastUpdate: new Date().getTime(),
nodeTransfer: undefined,
updateGame: function (numCycles = 1) {
if (this.nodeTransfer != undefined) {
prestigeSourceFile(this.nodeTransfer);
this.nodeTransfer = undefined;
}
const time = numCycles * CONSTANTS.MilliPerCycle;
if (Player.totalPlaytime == null) {
Player.totalPlaytime = 0;