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

+2 -2
View File
@@ -49,12 +49,12 @@ func _process(delta: float) -> void:
## Fetches every soundtrack from the server and shows them.
func load_from_server() -> void:
print("load_from_server")
GameLog.debug("load_from_server")
var populate_list: Callable = func populate_list(array) -> void:
if typeof(array) == TYPE_ARRAY:
show_soundtracks(array)
else:
print("Unexpected data")
GameLog.warning("Unexpected data")
MusicServerClient.fetch_all_soundtracks(populate_list)