aboutsummaryrefslogtreecommitdiff
path: root/game/src/MusicConductor
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-03-11 11:05:08 +0100
committer Spartan322 <Megacake1234@gmail.com>2023-03-11 11:05:08 +0100
commite60583c141dde1202bca03130a709a19e3d7d19a (patch)
tree8635940e139299409b3c8fab62e82ae3d33fbf6e /game/src/MusicConductor
parent62bc0a0c2fc851a1e167b8d8da7c280f5e525921 (diff)
Fix MusicConductor not loading music on exported executables
Diffstat (limited to 'game/src/MusicConductor')
-rw-r--r--game/src/MusicConductor/MusicConductor.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/game/src/MusicConductor/MusicConductor.gd b/game/src/MusicConductor/MusicConductor.gd
index 1dfa95d..c0cfc46 100644
--- a/game/src/MusicConductor/MusicConductor.gd
+++ b/game/src/MusicConductor/MusicConductor.gd
@@ -58,7 +58,8 @@ func select_previous_song() -> void:
func _ready():
var dir = DirAccess.open(music_directory)
for fname in dir.get_files():
- if !fname.ends_with(".import"):
+ if fname.ends_with(".import"):
+ fname = fname.get_basename()
if fname.get_basename() == first_song_name:
_selected_track = _available_songs.size()
_available_songs.append(SongInfo.new(music_directory, fname))