aboutsummaryrefslogtreecommitdiff
path: root/client/gui/menus/character.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-15 23:46:37 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-15 23:46:37 +0200
commitebb5c295c03cb1689c081006ad2ee167bd355d0a (patch)
tree1d62a388a97bfb09e5a01b565b2bae53acd966ce /client/gui/menus/character.gd
parent0b780e2271e63f10a2580afe9507d18d735527f8 (diff)
downloadhurrycurry-ebb5c295c03cb1689c081006ad2ee167bd355d0a.tar
hurrycurry-ebb5c295c03cb1689c081006ad2ee167bd355d0a.tar.bz2
hurrycurry-ebb5c295c03cb1689c081006ad2ee167bd355d0a.tar.zst
move profile related functions to static Profile members
Diffstat (limited to 'client/gui/menus/character.gd')
-rw-r--r--client/gui/menus/character.gd14
1 files changed, 7 insertions, 7 deletions
diff --git a/client/gui/menus/character.gd b/client/gui/menus/character.gd
index 3c1230ae..715a7b1f 100644
--- a/client/gui/menus/character.gd
+++ b/client/gui/menus/character.gd
@@ -22,8 +22,8 @@ extends Menu
func _ready():
super()
- $VBoxContainer/top_panel/a/username.text = Global.get_profile("username")
- character.set_style(Global.get_profile("character_style"), "chef")
+ $VBoxContainer/top_panel/a/username.text = Profile.read("username")
+ character.set_style(Profile.read("character_style"), "chef")
init_map()
func init_map():
@@ -61,8 +61,8 @@ func exit():
popup_data.buttons = [accept_button]
await submenu("res://gui/menus/popup.tscn", popup_data)
return
- Global.set_profile("username", username_edit.text)
- Global.save_profile()
+ Profile.write("username", username_edit.text)
+ Profile.save()
super()
func _on_character_back_pressed():
@@ -90,7 +90,7 @@ func _on_hairstyle_forward_pressed() -> void:
current_style.hairstyle = G.rem_euclid(current_style.hairstyle + 1, character.hairstyles.size()))
func modify_style(modifier: Callable):
- var current_style: Dictionary = Global.get_profile("character_style")
+ var current_style: Dictionary = Profile.read("character_style")
modifier.call(current_style)
- Global.set_profile("character_style", current_style)
- character.set_style(Global.get_profile("character_style"), "chef")
+ Profile.write("character_style", current_style)
+ character.set_style(Profile.read("character_style"), "chef")