From 2191602fb7a78f952e6523f4a74910d6199f1db6 Mon Sep 17 00:00:00 2001 From: tpart Date: Thu, 25 Jul 2024 19:18:03 +0200 Subject: Fix: Convert old settings file with incompatible types --- client/global.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/global.gd b/client/global.gd index 124bebf4..949d1fc5 100644 --- a/client/global.gd +++ b/client/global.gd @@ -236,10 +236,12 @@ func load_settings(path: String): if saved_dict != null and saved_dict is Dictionary: for k in default_settings.keys(): var setting: GameSetting = default_settings[k] - if saved_dict.has(k): + if saved_dict.has(k) and typeof(setting.get_value()) == typeof(saved_dict[k]): setting.set_value(saved_dict[k]) settings[k] = setting + save_settings() # Save updated keys + func on_vulkan() -> bool: return ProjectSettings.get_setting("rendering/rendering_device/driver") == "vulkan" -- cgit v1.2.3-70-g09d2