From b6413251a866c76538869b84ed1c9b9852f7c507 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Fri, 22 Dec 2023 23:01:51 -0500 Subject: Apply type hints to menu scripts --- game/src/Game/MusicConductor/MusicConductor.gd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'game/src/Game/MusicConductor/MusicConductor.gd') diff --git a/game/src/Game/MusicConductor/MusicConductor.gd b/game/src/Game/MusicConductor/MusicConductor.gd index f298db6..abfc52f 100644 --- a/game/src/Game/MusicConductor/MusicConductor.gd +++ b/game/src/Game/MusicConductor/MusicConductor.gd @@ -13,7 +13,7 @@ signal song_scrubbed(percentage : float, seconds : float) @export var _audio_stream_player : AudioStreamPlayer -var _selected_track = 0 +var _selected_track := 0 var _available_songs : Array[SongInfo] = [] var _auto_play_next_song : bool = true @@ -76,9 +76,9 @@ func select_previous_song() -> void: # REQUIREMENTS # * SND-2, SND-3 -func _ready(): - var dir = DirAccess.open(music_directory) - for fname in dir.get_files(): +func _ready() -> void: + var dir := DirAccess.open(music_directory) + for fname : String in dir.get_files(): if fname.ends_with(".import"): fname = fname.get_basename() if fname.get_basename() == first_song_name: @@ -91,7 +91,7 @@ func set_startup_music(play : bool) -> void: _has_startup_happened = true set_paused(not play) -func _on_audio_stream_player_finished(): +func _on_audio_stream_player_finished() -> void: song_finished.emit(_selected_track) if _auto_play_next_song: select_next_song() -- cgit v1.2.3-56-ga3b1