mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 08:13:50 +02:00
saving file now saves game
This commit is contained in:
@@ -77,6 +77,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
const [disableTextEffects, setDisableTextEffects] = useState(Settings.DisableTextEffects);
|
||||
const [enableBashHotkeys, setEnableBashHotkeys] = useState(Settings.EnableBashHotkeys);
|
||||
const [enableTimestamps, setEnableTimestamps] = useState(Settings.EnableTimestamps);
|
||||
const [saveGameOnFileSave, setSaveGameOnFileSave] = useState(Settings.SaveGameOnFileSave);
|
||||
|
||||
const [locale, setLocale] = useState(Settings.Locale);
|
||||
const [diagnosticOpen, setDiagnosticOpen] = useState(false);
|
||||
@@ -165,6 +166,10 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
setEnableTimestamps(event.target.checked);
|
||||
Settings.EnableTimestamps = event.target.checked;
|
||||
}
|
||||
function handleSaveGameOnFile(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSaveGameOnFileSave(event.target.checked);
|
||||
Settings.SaveGameOnFileSave = event.target.checked;
|
||||
}
|
||||
|
||||
function startImport(): void {
|
||||
if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return;
|
||||
@@ -505,6 +510,19 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
/>
|
||||
</ListItem>
|
||||
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={<Switch checked={saveGameOnFileSave} onChange={handleSaveGameOnFile} />}
|
||||
label={
|
||||
<Tooltip
|
||||
title={<Typography>Save your game any time a file is saved in the script editor.</Typography>}
|
||||
>
|
||||
<Typography>Save game on file save</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
|
||||
<ListItem>
|
||||
<Tooltip title={<Typography>Sets the locale for displaying numbers.</Typography>}>
|
||||
<Typography>Locale </Typography>
|
||||
|
||||
Reference in New Issue
Block a user