diff --git a/src/GameOptions/GameOptionsTab.ts b/src/GameOptions/GameOptionsTab.ts new file mode 100644 index 000000000..88b176f0a --- /dev/null +++ b/src/GameOptions/GameOptionsTab.ts @@ -0,0 +1,6 @@ +export enum GameOptionsTab { + SYSTEM, + INTERFACE, + GAMEPLAY, + MISC, +} diff --git a/src/GameOptions/ui/CurrentOptionsPage.tsx b/src/GameOptions/ui/CurrentOptionsPage.tsx new file mode 100644 index 000000000..ff154f768 --- /dev/null +++ b/src/GameOptions/ui/CurrentOptionsPage.tsx @@ -0,0 +1,356 @@ +import { MenuItem, Select, SelectChangeEvent, TextField, Tooltip, Typography } from "@mui/material"; +import React, { useState } from "react"; +import { IPlayer } from "../../PersonObjects/IPlayer"; +import { Settings } from "../../Settings/Settings"; +import { OptionSwitch } from "../../ui/React/OptionSwitch"; +import { formatTime } from "../../utils/helpers/formatTime"; +import { GameOptionsTab } from "../GameOptionsTab"; +import { GameOptionsPage } from "./GameOptionsPage"; +import { OptionsSlider } from "./OptionsSlider"; + +interface IProps { + currentTab: GameOptionsTab; + player: IPlayer; +} + +export const CurrentOptionsPage = (props: IProps): React.ReactElement => { + const [execTime, setExecTime] = useState(Settings.CodeInstructionRunTime); + const [recentScriptsSize, setRecentScriptsSize] = useState(Settings.MaxRecentScriptsCapacity); + const [logSize, setLogSize] = useState(Settings.MaxLogCapacity); + const [portSize, setPortSize] = useState(Settings.MaxPortCapacity); + const [terminalSize, setTerminalSize] = useState(Settings.MaxTerminalCapacity); + const [autosaveInterval, setAutosaveInterval] = useState(Settings.AutosaveInterval); + const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat); + const [locale, setLocale] = useState(Settings.Locale); + + function handleExecTimeChange(event: any, newValue: number | number[]): void { + setExecTime(newValue as number); + Settings.CodeInstructionRunTime = newValue as number; + } + + function handleRecentScriptsSizeChange(event: any, newValue: number | number[]): void { + setRecentScriptsSize(newValue as number); + Settings.MaxRecentScriptsCapacity = newValue as number; + } + + function handleLogSizeChange(event: any, newValue: number | number[]): void { + setLogSize(newValue as number); + Settings.MaxLogCapacity = newValue as number; + } + + function handlePortSizeChange(event: any, newValue: number | number[]): void { + setPortSize(newValue as number); + Settings.MaxPortCapacity = newValue as number; + } + + function handleTerminalSizeChange(event: any, newValue: number | number[]): void { + setTerminalSize(newValue as number); + Settings.MaxTerminalCapacity = newValue as number; + } + + function handleAutosaveIntervalChange(event: any, newValue: number | number[]): void { + setAutosaveInterval(newValue as number); + Settings.AutosaveInterval = newValue as number; + } + + function handleLocaleChange(event: SelectChangeEvent): void { + setLocale(event.target.value as string); + Settings.Locale = event.target.value as string; + } + + function handleTimestampFormatChange(event: React.ChangeEvent): void { + setTimestampFormat(event.target.value); + Settings.TimestampsFormat = event.target.value; + } + + const pages = { + [GameOptionsTab.SYSTEM]: ( + + {/* Wrap in a React fragment to prevent the sliders from breaking as list items */} + <> + + The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low + can result in poor performance if you have many scripts running. + + } + /> + + The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a + lot of memory if you have many scripts running. + + } + /> + + The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a + lot of memory if you have many scripts running. + + } + /> + + The maximum number of entries that can be written to a port using Netscript's write() function. Setting + this too high can cause the game to use a lot of memory. + + } + /> + + The maximum number of entries that can be written to the terminal. Setting this too high can cause the + game to use a lot of memory. + + } + marks + /> + The time (in seconds) between each autosave. Set to 0 to disable autosave.} + marks + /> + + (Settings.SuppressSavedGameToast = newValue)} + text="Suppress Auto-Save Game Toast" + tooltip={<>If this is set, there will be no "Game Saved!" toast appearing after an auto-save.} + /> + (Settings.SuppressAutosaveDisabledWarnings = newValue)} + text="Suppress Auto-Save Disabled Warning" + tooltip={<>If this is set, there will be no warning triggered when auto-save is disabled (at 0).} + /> + (Settings.SaveGameOnFileSave = newValue)} + text="Save game on file save" + tooltip={<>Save your game any time a file is saved in the script editor.} + /> + (Settings.ExcludeRunningScriptsFromSave = newValue)} + text="Exclude Running Scripts from Save" + tooltip={ + <> + If this is set, the save file will exclude all running scripts. This is only useful if your save is + lagging a lot. You'll have to restart your script every time you launch the game. + + } + /> + + ), + [GameOptionsTab.INTERFACE]: ( + + (Settings.DisableASCIIArt = newValue)} + text="Disable ascii art" + tooltip={<>If this is set all ASCII art will be disabled.} + /> + (Settings.DisableTextEffects = newValue)} + text="Disable text effects" + tooltip={ + <> + If this is set, text effects will not be displayed. This can help if text is difficult to read in certain + areas. + + } + /> + (Settings.DisableOverviewProgressBars = newValue)} + text="Disable Overview Progress Bars" + tooltip={<>If this is set, the progress bars in the character overview will be hidden.} + /> + (Settings.UseIEC60027_2 = newValue)} + text="Use GiB instead of GB" + tooltip={ + <>If this is set all references to memory will use GiB instead of GB, in accordance with IEC 60027-2. + } + /> + + Terminal commands and log entries will be timestamped. See https://date-fns.org/docs/Getting-Started/ + + } + > + + Timestamp format: + + ), + }} + value={timestampFormat} + onChange={handleTimestampFormatChange} + placeholder="yyyy-MM-dd hh:mm:ss" + /> + + <> + Sets the locale for displaying numbers.}> + Locale + + + + + ), + [GameOptionsTab.GAMEPLAY]: ( + + (Settings.SuppressMessages = newValue)} + text="Suppress story messages" + tooltip={ + <> + If this is set, then any messages you receive will not appear as popups on the screen. They will still get + sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command. + + } + /> + (Settings.SuppressFactionInvites = newValue)} + text="Suppress faction invites" + tooltip={ + <> + If this is set, then any faction invites you receive will not appear as popups on the screen. Your + outstanding faction invites can be viewed in the 'Factions' page. + + } + /> + (Settings.SuppressTravelConfirmation = newValue)} + text="Suppress travel confirmations" + tooltip={ + <> + If this is set, the confirmation message before traveling will not show up. You will automatically be + deducted the travel cost as soon as you click. + + } + /> + (Settings.SuppressBuyAugmentationConfirmation = newValue)} + text="Suppress augmentations confirmation" + tooltip={<>If this is set, the confirmation message before buying augmentation will not show up.} + /> + (Settings.SuppressTIXPopup = newValue)} + text="Suppress TIX messages" + tooltip={<>If this is set, the stock market will never create any popup.} + /> + {props.player.bladeburner && ( + (Settings.SuppressBladeburnerPopup = newValue)} + text="Suppress bladeburner popup" + tooltip={ + <> + If this is set, then having your Bladeburner actions interrupted by being busy with something else will + not display a popup message. + + } + /> + )} + + ), + [GameOptionsTab.MISC]: ( + + (Settings.DisableHotkeys = newValue)} + text="Disable hotkeys" + tooltip={ + <> + If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal + commands, hotkeys to navigate between different parts of the game, and the "Save and Close (Ctrl + b)" + hotkey in the Text Editor. + + } + /> + (Settings.EnableBashHotkeys = newValue)} + text="Enable bash hotkeys" + tooltip={ + <> + Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features that + more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default browser + shortcuts are overriden by the new Bash shortcuts. + + } + /> + + ), + }; + + return pages[props.currentTab]; +}; diff --git a/src/GameOptions/ui/GameOptionsPage.tsx b/src/GameOptions/ui/GameOptionsPage.tsx new file mode 100644 index 000000000..a8b5e4afa --- /dev/null +++ b/src/GameOptions/ui/GameOptionsPage.tsx @@ -0,0 +1,29 @@ +import { List, ListItem, Paper, Typography } from "@mui/material"; +import { uniqueId } from "lodash"; +import React from "react"; + +interface IProps { + children: React.ReactElement | (React.ReactElement | null)[]; + title: string; +} + +export const GameOptionsPage = (props: IProps): React.ReactElement => { + return ( + + {props.title} + {(props.children as any)?.length > 1 ? ( + + {(props.children as React.ReactElement[]) + .filter((c) => c) + .map((c, i) => ( + + {c} + + ))} + + ) : ( + props.children + )} + + ); +}; diff --git a/src/GameOptions/ui/GameOptionsRoot.tsx b/src/GameOptions/ui/GameOptionsRoot.tsx new file mode 100644 index 000000000..ee8097f92 --- /dev/null +++ b/src/GameOptions/ui/GameOptionsRoot.tsx @@ -0,0 +1,39 @@ +import { Box, Container, Typography } from "@mui/material"; +import React, { useState } from "react"; +import { IPlayer } from "../../PersonObjects/IPlayer"; +import { IRouter } from "../../ui/Router"; +import { GameOptionsTab } from "../GameOptionsTab"; +import { CurrentOptionsPage } from "./CurrentOptionsPage"; +import { GameOptionsSidebar } from "./GameOptionsSidebar"; + +interface IProps { + player: IPlayer; + router: IRouter; + save: () => void; + export: () => void; + forceKill: () => void; + softReset: () => void; +} + +export function GameOptionsRoot(props: IProps): React.ReactElement { + const [currentTab, setCurrentTab] = useState(GameOptionsTab.SYSTEM); + + return ( + + Options + + setCurrentTab(tab)} + player={props.player} + router={props.router} + save={props.save} + export={props.export} + forceKill={props.forceKill} + softReset={props.softReset} + /> + + + + ); +} diff --git a/src/GameOptions/ui/GameOptionsSidebar.tsx b/src/GameOptions/ui/GameOptionsSidebar.tsx new file mode 100644 index 000000000..3f472d8b4 --- /dev/null +++ b/src/GameOptions/ui/GameOptionsSidebar.tsx @@ -0,0 +1,336 @@ +import { + BugReport, + Chat, + Download, + LibraryBooks, + Palette, + Public, + Reddit, + Save, + SystemUpdateAlt, + Upload, + Bloodtype, +} from "@mui/icons-material"; +import { Box, Button, List, ListItemButton, Paper, Tooltip, Typography } from "@mui/material"; +import { default as React, useRef, useState } from "react"; +import { FileDiagnosticModal } from "../../Diagnostic/FileDiagnosticModal"; +import { IPlayer } from "../../PersonObjects/IPlayer"; +import { ImportData, saveObject } from "../../SaveObject"; +import { Settings } from "../../Settings/Settings"; +import { StyleEditorButton } from "../../Themes/ui/StyleEditorButton"; +import { ThemeEditorButton } from "../../Themes/ui/ThemeEditorButton"; +import { ConfirmationModal } from "../../ui/React/ConfirmationModal"; +import { DeleteGameButton } from "../../ui/React/DeleteGameButton"; +import { SnackbarEvents, ToastVariant } from "../../ui/React/Snackbar"; +import { SoftResetButton } from "../../ui/React/SoftResetButton"; +import { IRouter } from "../../ui/Router"; +import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; +import { GameOptionsTab } from "../GameOptionsTab"; + +interface IProps { + tab: GameOptionsTab; + setTab: (tab: GameOptionsTab) => void; + player: IPlayer; + router: IRouter; + save: () => void; + export: () => void; + forceKill: () => void; + softReset: () => void; +} + +interface ITabProps { + sideBarProps: IProps; + tab: GameOptionsTab; + tabName: string; +} + +const SideBarTab = (props: ITabProps): React.ReactElement => { + return ( + props.sideBarProps.setTab(props.tab)} + > + {props.tabName} + + ); +}; + +export const GameOptionsSidebar = (props: IProps): React.ReactElement => { + const importInput = useRef(null); + + const [diagnosticOpen, setDiagnosticOpen] = useState(false); + const [importSaveOpen, setImportSaveOpen] = useState(false); + const [importData, setImportData] = useState(null); + + function startImport(): void { + if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return; + const ii = importInput.current; + if (ii === null) throw new Error("import input should not be null"); + ii.click(); + } + + async function onImport(event: React.ChangeEvent): Promise { + try { + const base64Save = await saveObject.getImportStringFromFile(event.target.files); + const data = await saveObject.getImportDataFromString(base64Save); + setImportData(data); + setImportSaveOpen(true); + } catch (ex: any) { + SnackbarEvents.emit(ex.toString(), ToastVariant.ERROR, 5000); + } + } + + async function confirmedImportGame(): Promise { + if (!importData) return; + + try { + await saveObject.importGame(importData.base64); + } catch (ex: any) { + SnackbarEvents.emit(ex.toString(), ToastVariant.ERROR, 5000); + } + + setImportSaveOpen(false); + setImportData(null); + } + + function compareSaveGame(): void { + if (!importData) return; + props.router.toImportSave(importData.base64); + setImportSaveOpen(false); + setImportData(null); + } + + return ( + + + + + + + + + + + + + + + Export your game to a text file.}> + + + + Import your game from a text file. +
+ This will overwrite your current game. Back it up first! + + } + > + +
+ setImportSaveOpen(false)} + onConfirm={() => confirmedImportGame()} + additionalButton={} + confirmationText={ + <> + Importing a new game will completely wipe the current data! +
+
+ Make sure to have a backup of your current save file before importing. +
+ The file you are attempting to import seems valid. + {(importData?.playerData?.lastSave ?? 0) > 0 && ( + <> +
+
+ The export date of the save file is{" "} + {new Date(importData?.playerData?.lastSave ?? 0).toLocaleString()} + + )} + {(importData?.playerData?.totalPlaytime ?? 0) > 0 && ( + <> +
+
+ Total play time of imported game:{" "} + {convertTimeMsToTimeElapsedString(importData?.playerData?.totalPlaytime ?? 0)} + + )} +
+
+ + } + /> + + Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. + After using this, save the game and then reload the page. This is different then normal kill in that + normal kill will tell the script to shut down while force kill just removes the references to it (and it + should crash on it's own). This will not remove the files on your computer. Just forcefully kill all + running instances of all scripts. + + } + > + + + + + + + If your save file is extremely big you can use this button to view a map of all the files on every server. + Be careful there might be spoilers. + + } + > + + + + + + + + + + + + + + + + + + + + + + {!location.href.startsWith("file://") && ( + +
+ +
+ +
+ )} +
+ setDiagnosticOpen(false)} /> +
+ ); +}; diff --git a/src/GameOptions/ui/OptionsSlider.tsx b/src/GameOptions/ui/OptionsSlider.tsx new file mode 100644 index 000000000..5c0377d77 --- /dev/null +++ b/src/GameOptions/ui/OptionsSlider.tsx @@ -0,0 +1,38 @@ +import { Slider, Tooltip, Typography, Box } from "@mui/material"; +import React from "react"; + +interface IProps { + value: any; + callback: (event: any, newValue: number | number[]) => void; + step: number; + min: number; + max: number; + tooltip: React.ReactElement; + label: string; + marks?: boolean; +} + +export const OptionsSlider = (props: IProps): React.ReactElement => { + return ( + + {props.tooltip}}> + {props.label} + + + + ); +}; diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 91a18c527..ad6d73580 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -44,7 +44,7 @@ import { CorporationRoot } from "../Corporation/ui/CorporationRoot"; import { InfiltrationRoot } from "../Infiltration/ui/InfiltrationRoot"; import { GraftingRoot } from "../PersonObjects/Grafting/ui/GraftingRoot"; import { WorkInProgressRoot } from "./WorkInProgressRoot"; -import { GameOptionsRoot } from "./React/GameOptionsRoot"; +import { GameOptionsRoot } from "../GameOptions/ui/GameOptionsRoot"; import { SleeveRoot } from "../PersonObjects/Sleeve/ui/SleeveRoot"; import { HacknetRoot } from "../Hacknet/ui/HacknetRoot"; import { GenericLocation } from "../Locations/ui/GenericLocation"; diff --git a/src/ui/React/GameOptionsRoot.tsx b/src/ui/React/GameOptionsRoot.tsx deleted file mode 100644 index c93ae4564..000000000 --- a/src/ui/React/GameOptionsRoot.tsx +++ /dev/null @@ -1,667 +0,0 @@ -import React, { useState, useRef } from "react"; - -import { IPlayer } from "../../PersonObjects/IPlayer"; - -import { Theme } from "@mui/material/styles"; -import makeStyles from "@mui/styles/makeStyles"; -import createStyles from "@mui/styles/createStyles"; -import Typography from "@mui/material/Typography"; -import Slider from "@mui/material/Slider"; -import Grid from "@mui/material/Grid"; -import Select, { SelectChangeEvent } from "@mui/material/Select"; -import MenuItem from "@mui/material/MenuItem"; -import Button from "@mui/material/Button"; - -import Box from "@mui/material/Box"; -import List from "@mui/material/List"; -import ListItem from "@mui/material/ListItem"; -import Link from "@mui/material/Link"; -import Tooltip from "@mui/material/Tooltip"; -import TextField from "@mui/material/TextField"; - -import DownloadIcon from "@mui/icons-material/Download"; -import UploadIcon from "@mui/icons-material/Upload"; -import SaveIcon from "@mui/icons-material/Save"; -import PaletteIcon from "@mui/icons-material/Palette"; - -import { FileDiagnosticModal } from "../../Diagnostic/FileDiagnosticModal"; -import { ConfirmationModal } from "./ConfirmationModal"; - -import { SnackbarEvents, ToastVariant } from "./Snackbar"; - -import { Settings } from "../../Settings/Settings"; -import { DeleteGameButton } from "./DeleteGameButton"; -import { SoftResetButton } from "./SoftResetButton"; -import { IRouter } from "../Router"; -import { ThemeEditorButton } from "../../Themes/ui/ThemeEditorButton"; -import { StyleEditorButton } from "../../Themes/ui/StyleEditorButton"; -import { formatTime } from "../../utils/helpers/formatTime"; -import { OptionSwitch } from "./OptionSwitch"; -import { ImportData, saveObject } from "../../SaveObject"; -import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; - -const useStyles = makeStyles((theme: Theme) => - createStyles({ - root: { - width: 50, - padding: theme.spacing(2), - userSelect: "none", - }, - }), -); - -interface IProps { - player: IPlayer; - router: IRouter; - save: () => void; - export: () => void; - forceKill: () => void; - softReset: () => void; -} - -export function GameOptionsRoot(props: IProps): React.ReactElement { - const classes = useStyles(); - const importInput = useRef(null); - - const [execTime, setExecTime] = useState(Settings.CodeInstructionRunTime); - const [recentScriptsSize, setRecentScriptsSize] = useState(Settings.MaxRecentScriptsCapacity); - const [logSize, setLogSize] = useState(Settings.MaxLogCapacity); - const [portSize, setPortSize] = useState(Settings.MaxPortCapacity); - const [terminalSize, setTerminalSize] = useState(Settings.MaxTerminalCapacity); - const [autosaveInterval, setAutosaveInterval] = useState(Settings.AutosaveInterval); - const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat); - const [locale, setLocale] = useState(Settings.Locale); - const [diagnosticOpen, setDiagnosticOpen] = useState(false); - const [importSaveOpen, setImportSaveOpen] = useState(false); - const [importData, setImportData] = useState(null); - - function handleExecTimeChange(event: any, newValue: number | number[]): void { - setExecTime(newValue as number); - Settings.CodeInstructionRunTime = newValue as number; - } - - function handleRecentScriptsSizeChange(event: any, newValue: number | number[]): void { - setRecentScriptsSize(newValue as number); - Settings.MaxRecentScriptsCapacity = newValue as number; - } - - function handleLogSizeChange(event: any, newValue: number | number[]): void { - setLogSize(newValue as number); - Settings.MaxLogCapacity = newValue as number; - } - - function handlePortSizeChange(event: any, newValue: number | number[]): void { - setPortSize(newValue as number); - Settings.MaxPortCapacity = newValue as number; - } - - function handleTerminalSizeChange(event: any, newValue: number | number[]): void { - setTerminalSize(newValue as number); - Settings.MaxTerminalCapacity = newValue as number; - } - - function handleAutosaveIntervalChange(event: any, newValue: number | number[]): void { - setAutosaveInterval(newValue as number); - Settings.AutosaveInterval = newValue as number; - } - - function handleLocaleChange(event: SelectChangeEvent): void { - setLocale(event.target.value as string); - Settings.Locale = event.target.value as string; - } - - function handleTimestampFormatChange(event: React.ChangeEvent): void { - setTimestampFormat(event.target.value); - Settings.TimestampsFormat = event.target.value; - } - - function startImport(): void { - if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return; - const ii = importInput.current; - if (ii === null) throw new Error("import input should not be null"); - ii.click(); - } - - async function onImport(event: React.ChangeEvent): Promise { - try { - const base64Save = await saveObject.getImportStringFromFile(event.target.files); - const data = await saveObject.getImportDataFromString(base64Save); - setImportData(data); - setImportSaveOpen(true); - } catch (ex: any) { - SnackbarEvents.emit(ex.toString(), ToastVariant.ERROR, 5000); - } - } - - async function confirmedImportGame(): Promise { - if (!importData) return; - - try { - await saveObject.importGame(importData.base64); - } catch (ex: any) { - SnackbarEvents.emit(ex.toString(), ToastVariant.ERROR, 5000); - } - - setImportSaveOpen(false); - setImportData(null); - } - - function compareSaveGame(): void { - if (!importData) return; - props.router.toImportSave(importData.base64); - setImportSaveOpen(false); - setImportData(null); - } - - return ( -
- - Options - - - - - - - - - The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too - low can result in poor performance if you have many scripts running. - - } - > - .script exec time (ms) - - - - The maximum number of recently killed script entries being tracked. Setting this too high can - cause the game to use a lot of memory. - - } - > - Recently killed scripts size - - - - The maximum number of lines a script's logs can hold. Setting this too high can cause the game to - use a lot of memory if you have many scripts running. - - } - > - Netscript log size - - - - The maximum number of entries that can be written to a port using Netscript's write() function. - Setting this too high can cause the game to use a lot of memory. - - } - > - Netscript port size - - - - The maximum number of entries that can be written to the terminal. Setting this too high can cause - the game to use a lot of memory. - - } - > - Terminal capacity - - - The time (in seconds) between each autosave. Set to 0 to disable autosave. - } - > - Autosave interval (s) - - - - - - (Settings.SuppressMessages = newValue)} - text="Suppress story messages" - tooltip={ - <> - If this is set, then any messages you receive will not appear as popups on the screen. They will - still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal - command. - - } - /> - - - (Settings.SuppressFactionInvites = newValue)} - text="Suppress faction invites" - tooltip={ - <> - If this is set, then any faction invites you receive will not appear as popups on the screen. Your - outstanding faction invites can be viewed in the 'Factions' page. - - } - /> - - - (Settings.SuppressTravelConfirmation = newValue)} - text="Suppress travel confirmations" - tooltip={ - <> - If this is set, the confirmation message before traveling will not show up. You will automatically - be deducted the travel cost as soon as you click. - - } - /> - - - (Settings.SuppressBuyAugmentationConfirmation = newValue)} - text="Suppress augmentations confirmation" - tooltip={<>If this is set, the confirmation message before buying augmentation will not show up.} - /> - - - (Settings.SuppressTIXPopup = newValue)} - text="Suppress TIX messages" - tooltip={<>If this is set, the stock market will never create any popup.} - /> - - {!!props.player.bladeburner && ( - - (Settings.SuppressBladeburnerPopup = newValue)} - text="Suppress bladeburner popup" - tooltip={ - <> - If this is set, then having your Bladeburner actions interrupted by being busy with something else - will not display a popup message. - - } - /> - - )} - - (Settings.SuppressSavedGameToast = newValue)} - text="Suppress Auto-Save Game Toast" - tooltip={<>If this is set, there will be no "Game Saved!" toast appearing after an auto-save.} - /> - - - (Settings.SuppressAutosaveDisabledWarnings = newValue)} - text="Suppress Auto-Save Disabled Warning" - tooltip={<>If this is set, there will be no warning triggered when auto-save is disabled (at 0).} - /> - - - (Settings.DisableHotkeys = newValue)} - text="Disable hotkeys" - tooltip={ - <> - If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes - Terminal commands, hotkeys to navigate between different parts of the game, and the "Save and Close - (Ctrl + b)" hotkey in the Text Editor. - - } - /> - - - (Settings.DisableASCIIArt = newValue)} - text="Disable ascii art" - tooltip={<>If this is set all ASCII art will be disabled.} - /> - - - (Settings.DisableTextEffects = newValue)} - text="Disable text effects" - tooltip={ - <> - If this is set, text effects will not be displayed. This can help if text is difficult to read in - certain areas. - - } - /> - - - (Settings.DisableOverviewProgressBars = newValue)} - text="Disable Overview Progress Bars" - tooltip={<>If this is set, the progress bars in the character overview will be hidden.} - /> - - - (Settings.EnableBashHotkeys = newValue)} - text="Enable bash hotkeys" - tooltip={ - <> - Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features - that more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default - browser shortcuts are overriden by the new Bash shortcuts. - - } - /> - - - (Settings.UseIEC60027_2 = newValue)} - text="Use GiB instead of GB" - tooltip={ - <> - If this is set all references to memory will use GiB instead of GB, in accordance with IEC 60027-2. - - } - /> - - - (Settings.ExcludeRunningScriptsFromSave = newValue)} - text="Exclude Running Scripts from Save" - tooltip={ - <> - If this is set, the save file will exclude all running scripts. This is only useful if your save is - lagging a lot. You'll have to restart your script every time you launch the game. - - } - /> - - - - Terminal commands and log entries will be timestamped. See - https://date-fns.org/docs/Getting-Started/ - - } - > - - - Timestamp format:  - - ), - }} - value={timestampFormat} - onChange={handleTimestampFormatChange} - placeholder="yyyy-MM-dd hh:mm:ss" - /> - - - - - - (Settings.SaveGameOnFileSave = newValue)} - text="Save game on file save" - tooltip={<>Save your game any time a file is saved in the script editor.} - /> - - - - Sets the locale for displaying numbers.}> - Locale  - - - - - {!location.href.startsWith("file://") && ( - <> - - danielyxie / BigD (Original developer): -
- - - -
-
- - - - hydroflame (Current maintainer):{" "} - - Donate blood! - {" "} - - - - )} -
- - - - - - - Export your game to a text file.}> - - - - Import your game from a text file. -
- This will overwrite your current game. Back it up first! - - } - > - -
- setImportSaveOpen(false)} - onConfirm={() => confirmedImportGame()} - additionalButton={} - confirmationText={ - <> - Importing a new game will completely wipe the current data! -
-
- Make sure to have a backup of your current save file before importing. -
- The file you are attempting to import seems valid. - {(importData?.playerData?.lastSave ?? 0) > 0 && ( - <> -
-
- The export date of the save file is{" "} - {new Date(importData?.playerData?.lastSave ?? 0).toLocaleString()} - - )} - {(importData?.playerData?.totalPlaytime ?? 0) > 0 && ( - <> -
-
- Total play time of imported game:{" "} - {convertTimeMsToTimeElapsedString(importData?.playerData?.totalPlaytime ?? 0)} - - )} -
-
- - } - /> -
- - - Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the - game. After using this, save the game and then reload the page. This is different then normal kill in - that normal kill will tell the script to shut down while force kill just removes the references to it - (and it should crash on it's own). This will not remove the files on your computer. Just forcefully - kill all running instance of all scripts. - - } - > - - - - - - - If your save file is extremely big you can use this button to view a map of all the files on every - server. Be careful there might be spoilers. - - } - > - - - - - - - - - - - - - Report bug - - - Changelog - - - Documentation - - - Discord - - - Reddit - - - Incremental game plaza - - -
-
- setDiagnosticOpen(false)} /> -
- ); -}