From e89f80d563f98b8911c794e4add645a6a811d718 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 19 Sep 2024 13:59:16 +0200 Subject: only save settings with non-default values --- client/global.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/global.gd') 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) -- cgit v1.2.3-70-g09d2