Log through a GameLog autoload instead of print()

GameLog.debug() prints only in debug builds, and GameLog.warning() reports
problems such as unexpected server data or failed downloads.
This commit is contained in:
Sansan committed 2026-10-06 11:15:03 +02:00
1 parent 5cdec5cc8f
commit 5831e1e73d
20 files changed
+137 -89

No files matched your search

+6 -6
View File
@@ -22,18 +22,18 @@ func _ready() -> void:
close_timer.timeout.connect(_on_close_timeout)
func _on_close_timeout() -> void:
print("_on_close_timeout!")
GameLog.debug("_on_close_timeout!")
Settings.character_select_open = false
close_timer.stop()
func load_characters() -> void:
print("load_characters")
GameLog.debug("load_characters")
var fetch_character_list: Callable = func fetch_character_list(list) -> void:
print("fetch_character_list")
GameLog.debug("fetch_character_list")
Settings.delete_children(character_grid)
if typeof(list) == TYPE_ARRAY:
for character_name: String in list:
print("character_name ", character_name)
GameLog.debug("character_name ", character_name)
var character_box: Character = character.instantiate()
character_grid.add_child(character_box)
character_box.custom_minimum_size = Vector2(235, 145)
@@ -43,7 +43,7 @@ func load_characters() -> void:
MusicServerClient.fetch_character_list(fetch_character_list)
func show_grid(player_name: String) -> void:
print("show_grid")
GameLog.debug("show_grid")
title_label.text = "Select character for " + player_name
close_timer.stop()
open()
@@ -55,7 +55,7 @@ func close() -> void:
Settings.character_select_open = false
func _on_character_selected(texture: ImageTexture) -> void:
print("_on_character_selected")
GameLog.debug("_on_character_selected")
# Not close(): character_select_open stays true until close_timer fires, so the click
# that picked the character does not also select a song behind it
self.visible = false