aboutsummaryrefslogtreecommitdiff
path: root/client/system
diff options
context:
space:
mode:
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()