aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/MusicConductor/MusicConductor.gd
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-12-23 05:01:51 +0100
committer George L. Albany <Megacake1234@gmail.com>2023-12-24 04:52:36 +0100
commitb6413251a866c76538869b84ed1c9b9852f7c507 (patch)
tree1b99c935438692bb2ebadeac412b990c82089b65 /game/src/Game/MusicConductor/MusicConductor.gd
parent50b0b935b0bf0724f40b5140aca85d1830a8b1b3 (diff)
Apply type hints to menu scripts
Diffstat (limited to 'game/src/Game/MusicConductor/MusicConductor.gd')
-rw-r--r--game/src/Game/MusicConductor/MusicConductor.gd10
1 files changed, 5 insertions, 5 deletions
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()