diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-12 01:30:53 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-12 01:30:53 +0200 |
commit | 55d3fd0c7ead5c47a3fbf63463b70af328e7dcc9 (patch) | |
tree | 994c689c3aa3e6ab62ec4bfac1ddf5aabb5f9d7d /client/menu/character.gd | |
parent | 177056420c5f31a0fb41e9ce0a67fc90cad4312e (diff) | |
parent | 0f0c7713218dc9fc8beafdbe14785c11a0f61ea8 (diff) | |
download | hurrycurry-55d3fd0c7ead5c47a3fbf63463b70af328e7dcc9.tar hurrycurry-55d3fd0c7ead5c47a3fbf63463b70af328e7dcc9.tar.bz2 hurrycurry-55d3fd0c7ead5c47a3fbf63463b70af328e7dcc9.tar.zst |
Merge branch 'master' of https://codeberg.org/hurrycurry/hurrycurry
Diffstat (limited to 'client/menu/character.gd')
-rw-r--r-- | client/menu/character.gd | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/client/menu/character.gd b/client/menu/character.gd index b4427e13..0d6a625c 100644 --- a/client/menu/character.gd +++ b/client/menu/character.gd @@ -23,8 +23,8 @@ extends Menu func _ready(): super() - $VBoxContainer/top_panel/a/username.text = Global.profile["username"] - character.select_hairstyle(Global.profile["character"]) + $VBoxContainer/top_panel/a/username.text = Global.get_profile("username") + character.select_hairstyle(Global.get_profile("character")) init_map() func init_map(): @@ -61,16 +61,14 @@ func _on_back_pressed(): OS.alert("Username cannot be empty.") return - Global.profile["username"] = username_edit.text + Global.set_profile("username", username_edit.text) Global.save_profile() replace_menu("res://menu/main.tscn") func _on_character_back_pressed(): - Global.profile["character"] = (Global.profile["character"] - 1) % num_hairstyles - character.select_hairstyle(Global.profile["character"]) - Global.save_profile() + Global.set_profile("character", (Global.get_profile("character") - 1) % num_hairstyles) + character.select_hairstyle(Global.get_profile("character")) func _on_character_forward_pressed(): - Global.profile["character"] = (Global.profile["character"] + 1) % num_hairstyles - character.select_hairstyle(Global.profile["character"]) - Global.save_profile() + Global.set_profile("character", (Global.get_profile("character") + 1) % num_hairstyles) + character.select_hairstyle(Global.get_profile("character")) |