updated node starting messages actually show up (#397)

This commit is contained in:
Mughur
2023-02-27 21:46:01 +02:00
committed by GitHub
parent 5cef60cd21
commit 9d504b0dfb
3 changed files with 23 additions and 5 deletions
+7 -1
View File
@@ -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;