diff options
| author | tpart <tpart120@proton.me> | 2024-07-12 00:49:30 +0200 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2024-07-12 00:49:42 +0200 |
| commit | 6173d3e9a45f17dc92318d11786c5631143808e5 (patch) | |
| tree | 156571ba92601545bfe8f543f0192ecb4bc55d8b /client/global.gd | |
| parent | bcb1105f8103e20e716e9a3cfb9c0d5cb11db765 (diff) | |
| download | hurrycurry-6173d3e9a45f17dc92318d11786c5631143808e5.tar hurrycurry-6173d3e9a45f17dc92318d11786c5631143808e5.tar.bz2 hurrycurry-6173d3e9a45f17dc92318d11786c5631143808e5.tar.zst | |
Add hint system
Diffstat (limited to 'client/global.gd')
| -rw-r--r-- | client/global.gd | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/client/global.gd b/client/global.gd index 6584c1d9..38b228e3 100644 --- a/client/global.gd +++ b/client/global.gd @@ -24,7 +24,8 @@ signal using_joypad_change(using: bool) var default_profile := { "username": "Giovanni", "character": 0, - "last_server_url": "" + "last_server_url": "", + "hint_boost_seen": false } var languages := [tr("System default"), "en", "de"] var using_joypad := false @@ -203,6 +204,21 @@ func set_setting(key: String, value): push_error("Tried to set setting \"%s\", which does not yet exist (missing key)" % key) return settings[key].set_value(value) + save_settings() + +func get_profile(key: String): + if profile.has(key): + return profile[key] + else: + push_error("Tried to access profile setting \"%s\", which does not exist (missing key)" % key) + return null + +func set_profile(key: String, value): + if !profile.has(key): + push_error("Tried to set profile setting \"%s\", which does not yet exist (missing key)" % key) + return + profile[key] = value + save_profile() static func interpolate(current, target, dt): return target + (current - target) * exp(-dt) |