diff options
author | Nemrav <50055236+Nemrav@users.noreply.github.com> | 2024-08-06 01:48:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-06 01:48:36 +0200 |
commit | 82b16bcca7c74607a8885b882ec36f5202e7ef70 (patch) | |
tree | 0a9bd4f52c01315c3b38ce641a78c33bd8562be2 /game/src/Game/GameStart.gd | |
parent | fde15e554dc9ed458a838683c69d10262764db12 (diff) | |
parent | 9506f4160f0bd351f0853e6e8263ea927d9ec771 (diff) |
Merge pull request #243 from Nemrav/music
Music and sound effects
Diffstat (limited to 'game/src/Game/GameStart.gd')
-rw-r--r-- | game/src/Game/GameStart.gd | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/game/src/Game/GameStart.gd b/game/src/Game/GameStart.gd index 6074df8..3c046a0 100644 --- a/game/src/Game/GameStart.gd +++ b/game/src/Game/GameStart.gd @@ -105,8 +105,32 @@ func _setup_compatibility_mode_paths() -> void: _compatibility_path_list.push_back(actual_base_path + "/mod/" + mod_name) func _load_compatibility_mode() -> void: - if GameSingleton.load_defines_compatibility_mode(_compatibility_path_list) != OK: + if GameSingleton.set_compatibility_mode_roots(_compatibility_path_list) != OK: + push_error("Errors setting game roots!") + + setup_title_theme() + + if GameSingleton.load_defines_compatibility_mode() != OK: push_error("Errors loading game defines!") + + SoundSingleton.load_sounds() + SoundSingleton.load_music() + MusicConductor.add_compat_songs() + +func setup_title_theme() -> void: + SoundSingleton.load_title_theme() + + MusicConductor.setup_compat_song(SoundSingleton.title_theme) + + var song_paths = MusicConductor.get_all_song_paths() + var title_index = song_paths.find(SoundSingleton.title_theme) + if title_index != -1: + MusicConductor.call_deferred("start_song_by_index",title_index) + if len(MusicConductor._available_songs) <= 0: + push_error("No song available to play") + else: + MusicConductor.call_deferred("start_current_song") + # REQUIREMENTS # * FS-333, FS-334, FS-335, FS-341 |