import React, { useEffect } from "react"; import { Typography, Link, Button, ButtonGroup, Tooltip, Box, Paper, TextField } from "@mui/material"; import { Settings } from "../../Settings/Settings"; import { load } from "../../db"; import { IRouter } from "../Router"; import { download } from "../../SaveObject"; import { IErrorData, newIssueUrl } from "../../utils/ErrorHelper"; import { DeleteGameButton } from "./DeleteGameButton"; import { SoftResetButton } from "./SoftResetButton"; import DirectionsRunIcon from '@mui/icons-material/DirectionsRun'; import GitHubIcon from "@mui/icons-material/GitHub"; export let RecoveryMode = false; export function ActivateRecoveryMode(): void { RecoveryMode = true; } interface IProps { router: IRouter; softReset: () => void; errorData?: IErrorData; resetError?: () => void; } export function RecoveryRoot({ router, softReset, errorData, resetError }: IProps): React.ReactElement { function recover(): void { if (resetError) resetError(); RecoveryMode = false; router.toTerminal(); } Settings.AutosaveInterval = 0; useEffect(() => { load().then((content) => { const epochTime = Math.round(Date.now() / 1000); const filename = `RECOVERY_BITBURNER_${epochTime}.json`; download(filename, content); }); }, []); return ( RECOVERY MODE ACTIVATED There was an error with your save file and the game went into recovery mode. In this mode saving is disabled and the game will automatically export your save file (to prevent corruption). At this point it is recommended to alert a developer. File an issue on github Make a reddit post Post in the #bug-report channel on Discord. Please include your save file.

You can disable recovery mode now. But chances are the game will not work correctly. {errorData && ( {errorData.title} )}
); }