Fix the sound bird interactaiblity issues.

This commit is contained in:
Michal Pikulski
2025-11-24 11:41:47 +01:00
parent f0abc4760b
commit e33de5da3d
10 changed files with 252 additions and 341 deletions

View File

@@ -85,9 +85,17 @@ namespace Core.SaveLoad
private void OnApplicationQuit()
{
if (DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>().useSaveLoadSystem)
var debugSettings = DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>();
// Only save if the save system is enabled AND dontSaveOnQuit is false
if (debugSettings.UseSaveLoadSystem && !debugSettings.DontSaveOnQuit)
{
Save();
Logging.Debug("[SaveLoadManager] Saving on application quit");
}
else if (debugSettings.DontSaveOnQuit)
{
Logging.Debug("[SaveLoadManager] Skipping save on quit (dontSaveOnQuit enabled)");
}
}

View File

@@ -29,10 +29,12 @@ namespace AppleHills.Core.Settings
[SerializeField] public bool pauseTimeOnPauseGame = true;
[Header("Save Load Options")]
[Tooltip("Should use save laod system?")]
[Tooltip("Should use save load system?")]
[SerializeField] public bool useSaveLoadSystem = true;
[Tooltip("Automatically clear all saves before entering play mode in editor")]
[SerializeField] public bool autoClearSaves = false;
[Tooltip("Load saves on start but don't save/overwrite data on exit")]
[SerializeField] public bool dontSaveOnQuit = false;
[Header("Logging Options")]
[Tooltip("Logging level for bootstrap services")]
@@ -51,7 +53,9 @@ namespace AppleHills.Core.Settings
// Property getters
public bool ShowDebugUiMessages => showDebugUiMessages;
public bool PauseTimeOnPauseGame => pauseTimeOnPauseGame;
public bool UseSaveLoadSystem => useSaveLoadSystem;
public bool AutoClearSaves => autoClearSaves;
public bool DontSaveOnQuit => dontSaveOnQuit;
public override void OnValidate()
{