diff options
| author | metamuffin <metamuffin@disroot.org> | 2024-09-19 13:59:16 +0200 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-09-19 13:59:16 +0200 |
| commit | e89f80d563f98b8911c794e4add645a6a811d718 (patch) | |
| tree | 286a5be84b623c862a04c1ecbc4336801f650889 /client/global.gd | |
| parent | ba5a51f5fabb68f0e103e41a593b2259ba2a013a (diff) | |
| download | hurrycurry-e89f80d563f98b8911c794e4add645a6a811d718.tar hurrycurry-e89f80d563f98b8911c794e4add645a6a811d718.tar.bz2 hurrycurry-e89f80d563f98b8911c794e4add645a6a811d718.tar.zst | |
only save settings with non-default values
Diffstat (limited to 'client/global.gd')
| -rw-r--r-- | client/global.gd | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/global.gd b/client/global.gd index 0923b457..404b4a8b 100644 --- a/client/global.gd +++ b/client/global.gd @@ -96,7 +96,10 @@ func save_profile(): save_dict("user://profile", profile) func save_settings(): - save_dict("user://settings", settings) + var saved = {} + for key in settings_tree.changed_keys(): + saved[key] = Global.get_setting(key) + save_dict("user://settings", saved) func save_dict(path: String, dict: Dictionary): var f = FileAccess.open(path, FileAccess.WRITE) |