Charakterbenennung aktualisiert

This commit is contained in:
torsten 2026-05-23 13:35:55 +02:00
parent 5060770c4c
commit 8a1f7f1b70

View file

@ -11,7 +11,11 @@ func show_creation_screen():
func _on_create_button_pressed() -> void:
var new_character = CharacterData.new()
new_character.character_name = name_line_edit.text
var entered_name: String = name_line_edit.text.strip_edges()
if entered_name.is_empty():
new_character.character_name = "Neuer Held" # Default name if input is empty
else:
new_character.character_name = entered_name
print("CharacterCreate: Created new character: ", new_character.character_name, " ID: ", new_character.id)
GameEvents.ui_character_created.emit(new_character)
hide()