mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Change SuppressSaveToast to only work on auto-save
Before this, this setting also suppressed the toast for the manual clicks.
This commit is contained in:
parent
7107dd682c
commit
46fe8cc94c
@ -64,12 +64,12 @@ class BitburnerSaveObject {
|
|||||||
return saveString;
|
return saveString;
|
||||||
}
|
}
|
||||||
|
|
||||||
saveGame(): void {
|
saveGame(emitToastEvent = true): void {
|
||||||
const saveString = this.getSaveString();
|
const saveString = this.getSaveString();
|
||||||
|
|
||||||
save(saveString)
|
save(saveString)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (!Settings.SuppressSavedGameToast) {
|
if (emitToastEvent) {
|
||||||
SnackbarEvents.emit("Game Saved!", "info", 2000);
|
SnackbarEvents.emit("Game Saved!", "info", 2000);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -186,7 +186,7 @@ const Engine: {
|
|||||||
Engine.Counters.autoSaveCounter = Infinity;
|
Engine.Counters.autoSaveCounter = Infinity;
|
||||||
} else {
|
} else {
|
||||||
Engine.Counters.autoSaveCounter = Settings.AutosaveInterval * 5;
|
Engine.Counters.autoSaveCounter = Settings.AutosaveInterval * 5;
|
||||||
saveObject.saveGame();
|
saveObject.saveGame(!Settings.SuppressSavedGameToast);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,10 +504,10 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
|||||||
label={
|
label={
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<Typography>If this is set, there will be no "Saved Game" toast appearing after save.</Typography>
|
<Typography>If this is set, there will be no "Game Saved!" toast appearing after an auto-save.</Typography>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Typography>Suppress Saved Game Toast</Typography>
|
<Typography>Suppress Auto-Save Game Toast</Typography>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user