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

+5 -5
View File
@@ -91,7 +91,7 @@ func play_or_pause() -> void:
audio_player.stream_paused = false
song_finished = false
audio_player.seek(playback_position)
print("continue")
GameLog.debug("continue")
progress_slider.max_value = round(stream.get_length())
if Settings.hide_ticks:
progress_slider.tick_count = 0
@@ -184,7 +184,7 @@ func play_song(song: AudioStream) -> void:
music_time_label.text = format_text(progress_slider.value, stream.get_length())
func play_song_object(song_object_no: int) -> void:
print("play_song_object")
GameLog.debug("play_song_object")
if audio_player.is_playing():
audio_player.stop()
await get_tree().create_timer(0.5).timeout
@@ -204,7 +204,7 @@ func play_song_object(song_object_no: int) -> void:
Playlist.set_currently_playing_song(song_object_no)
Playlist.unset_is_playing()
if !Settings.hide_next_track:
print("Show answer now!!")
GameLog.debug("Show answer now!!")
Playlist.song_is_answered(song_object_no)
Playlist.song_has_played(song_object_no)
Playlist.song_is_playing(song_object_no)
@@ -229,8 +229,8 @@ func load_mp3(_path: String) -> AudioStream:
func play_local_song() -> void:
if songs:
local_path = songs[0]
print(local_path)
print(FileAccess.file_exists(local_path))
GameLog.debug(local_path)
GameLog.debug(FileAccess.file_exists(local_path))
play_sound(load_mp3(local_path))
func sound_test_local() -> void: