From b605a261f72bb3763736b75175ce28a5a882dbda Mon Sep 17 00:00:00 2001 From: tpart Date: Tue, 30 Sep 2025 14:13:29 +0200 Subject: Autosave profile; Fix controls explanation not saving correctly --- client/system/profile.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/system/profile.gd') 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() -- cgit v1.2.3-70-g09d2