Add a warning triggered while auto-saves are off

The check auto-save engine loop will show a warning toast if the auto-saves are disabled (at 0s) and not suppressed. This warning includes a button to re-enable them.

Adds a user setting to suppress those warnings.
Adds information to save button tooltip.
This commit is contained in:
Martin Fournier
2022-03-25 06:53:58 -04:00
parent 1c801c5651
commit 2262d6d8dd
4 changed files with 52 additions and 3 deletions
+7
View File
@@ -118,6 +118,11 @@ interface IDefaultSettings {
*/
SuppressSavedGameToast: boolean;
/**
* Whether the user should be displayed a toast warning when the autosave is disabled.
*/
SuppressAutosaveDisabledWarnings: boolean;
/*
* Whether the game should skip saving the running scripts for late game
*/
@@ -197,6 +202,7 @@ export const defaultSettings: IDefaultSettings = {
SuppressBladeburnerPopup: false,
SuppressTIXPopup: false,
SuppressSavedGameToast: false,
SuppressAutosaveDisabledWarnings: false,
UseIEC60027_2: false,
ExcludeRunningScriptsFromSave: false,
IsSidebarOpened: true,
@@ -235,6 +241,7 @@ export const Settings: ISettings & ISelfInitializer & ISelfLoading = {
SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,
SuppressTIXPopup: defaultSettings.SuppressTIXPopup,
SuppressSavedGameToast: defaultSettings.SuppressSavedGameToast,
SuppressAutosaveDisabledWarnings: defaultSettings.SuppressAutosaveDisabledWarnings,
UseIEC60027_2: defaultSettings.UseIEC60027_2,
ExcludeRunningScriptsFromSave: defaultSettings.ExcludeRunningScriptsFromSave,
IsSidebarOpened: defaultSettings.IsSidebarOpened,