From 4aa3475ac4c00590c7f51405049d948102695ed9 Mon Sep 17 00:00:00 2001
From: Storm Dragon <stormdragon2976@gmail.com>
Date: Tue, 11 Mar 2025 21:15:24 -0400
Subject: [PATCH] Fixed some sound I forgot to exclude when refactoring this
 code.

---
 sound.py | 32 ++++++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 8 deletions(-)

diff --git a/sound.py b/sound.py
index 1271682..5dfb4c8 100644
--- a/sound.py
+++ b/sound.py
@@ -93,21 +93,37 @@ class Sound:
         except Exception as e:
             print(f"Error loading sounds: {e}")
     
-    def get_sound_list(self, excludeDirs=None):
-        """Get a list of available sounds, optionally excluding certain directories.
-        
+    def get_sound_list(self, excludeDirs=None, includeSpecial=False):
+        """Get a list of available sounds, optionally excluding certain directories and special sounds.
+    
         Args:
             excludeDirs (list): List of directory names to exclude
-            
+            includeSpecial (bool): Whether to include special sounds (logo, music_menu, etc.)
+        
         Returns:
             list: List of sound keys
         """
         if excludeDirs is None:
             excludeDirs = self.excludedLearnDirs
-            
-        # Filter sounds based on their directories
-        return [key for key, directory in self.soundDirectories.items() 
-                if directory not in excludeDirs]
+
+        # Special sound names to exclude unless specifically requested
+        specialSounds = ["music_menu", "logo", "game-intro"]
+
+        # Filter sounds based on their directories and special names
+        filtered_sounds = []
+        for key, directory in self.soundDirectories.items():
+            # Skip sounds in excluded directories
+            if directory in excludeDirs:
+                continue
+
+            # Skip special sounds unless specifically requested
+            basename = key.split('/')[-1]  # Get the filename without directory
+            if not includeSpecial and (basename in specialSounds or basename.startswith('_')):
+                continue
+
+            filtered_sounds.append(key)
+
+        return filtered_sounds
         
     def play_bgm(self, music_file):
         """Play background music with proper volume.