diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-03-11 11:05:08 +0100 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2023-03-11 11:05:08 +0100 |
commit | e60583c141dde1202bca03130a709a19e3d7d19a (patch) | |
tree | 8635940e139299409b3c8fab62e82ae3d33fbf6e /game | |
parent | 62bc0a0c2fc851a1e167b8d8da7c280f5e525921 (diff) |
Fix MusicConductor not loading music on exported executables
Diffstat (limited to 'game')
-rw-r--r-- | game/src/MusicConductor/MusicConductor.gd | 3 |
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)) |