diff options
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")) | 
