aboutsummaryrefslogtreecommitdiff
path: root/client/system
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2025-09-30 14:13:29 +0200
committertpart <tpart120@proton.me>2025-09-30 14:13:29 +0200
commitb605a261f72bb3763736b75175ce28a5a882dbda (patch)
tree5acf0a8c0279d81c17f2ce2985891838c5a8e78e /client/system
parent184366186986296cef96ccec75b563f33747ee36 (diff)
downloadhurrycurry-b605a261f72bb3763736b75175ce28a5a882dbda.tar
hurrycurry-b605a261f72bb3763736b75175ce28a5a882dbda.tar.bz2
hurrycurry-b605a261f72bb3763736b75175ce28a5a882dbda.tar.zst
Autosave profile; Fix controls explanation not saving correctly
Diffstat (limited to 'client/system')
-rw-r--r--client/system/profile.gd4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/system/profile.gd b/client/system/profile.gd
index 5fd7f548..89496af5 100644
--- a/client/system/profile.gd
+++ b/client/system/profile.gd
@@ -62,9 +62,11 @@ static func read(key: String):
push_error("Tried to access profile setting \"%s\", which does not exist (missing key)" % key)
return null
-static func write(key: String, value):
+static func write(key: String, value: Variant, autosave := true):
if !values.has(key):
push_error("Tried to set profile setting \"%s\", which does not yet exist (missing key)" % key)
return
if values[key] != value:
values[key] = value
+ if autosave:
+ save()