diff --git a/Toby Doom Launcher.py b/Toby Doom Launcher.py index a0352c6..7cc4bc6 100755 --- a/Toby Doom Launcher.py +++ b/Toby Doom Launcher.py @@ -1922,9 +1922,13 @@ class DoomLauncher(QMainWindow): """Populate the game selection combo box""" gameList = [ "Toby Demo Map", + "Funny Pack - Demo Map", "Classic Doom", + "Funny Pack - Classic Doom", "Toby Doom", + "Funny Pack - Toby Doom", "OperationMDK", + "Funny Pack - OperationMDK", "Classic Heretic", "Toby Heretic", "Classic Hexen", @@ -1958,8 +1962,13 @@ class DoomLauncher(QMainWindow): return shutil.which("gzdoom") - def get_addon_files(self, game_type: str = "DOOM") -> List[str]: - """Get all addon PK3 files for specified game type""" + def get_addon_files(self, game_type: str = "DOOM", use_funny_pack: bool = False) -> List[str]: + """Get all addon PK3 files for specified game type + + Args: + game_type: The game type (DOOM, HERETIC, HEXEN) + use_funny_pack: Whether to use the Funny Pack instead of normal monsters + """ addonFiles = [] # MENU addons are common to all games menuPath = self.gamePath / "Addons" / "MENU" @@ -1971,11 +1980,35 @@ class DoomLauncher(QMainWindow): if gamePath.exists(): if game_type == "HERETIC": pattern = "TobyHeretic*.pk3" + addonFiles.extend(str(p) for p in gamePath.glob(pattern)) elif game_type == "HEXEN": pattern = "TobyHexen*.pk3" + addonFiles.extend(str(p) for p in gamePath.glob(pattern)) else: # DOOM - pattern = "Toby*.pk3" - addonFiles.extend(str(p) for p in gamePath.glob(pattern)) + # Add normal Doom addons (but skip monster packs if using Funny Pack) + if use_funny_pack: + # Only add non-monster Doom addons + for pk3Path in gamePath.glob("Toby*.pk3"): + if "Monsters" not in pk3Path.name: + addonFiles.append(str(pk3Path)) + + # Look for Funny Pack in the APRIL folder + aprilPath = self.gamePath / "Addons" / "APRIL" + funnyPackPath = aprilPath / "Toby_Funny_Pack.pk3" + + if funnyPackPath.exists(): + # Add the Funny Pack from APRIL folder + addonFiles.append(str(funnyPackPath)) + else: + QMessageBox.warning( + None, + "Funny Pack Missing", + f"Toby_Funny_Pack.pk3 not found in {aprilPath}. Please make sure it's installed correctly in the Addons/APRIL folder." + ) + else: + # Normal behavior for non-Funny Pack games + pattern = "Toby*.pk3" + addonFiles.extend(str(p) for p in gamePath.glob(pattern)) return addonFiles @@ -1987,6 +2020,7 @@ class DoomLauncher(QMainWindow): baseFiles = [str(tobyMod)] selectedGame = self.gameCombo.currentText() + isFunnyPack = "Funny Pack" in selectedGame # Determine game type and get corresponding addons if "Heretic" in selectedGame: @@ -2009,16 +2043,16 @@ class DoomLauncher(QMainWindow): elif "OperationMDK" in selectedGame: baseFiles.append(str(self.gamePath / "OpMDK.wad")) - # Add metal music mod if available (Doom only) - metalV7 = self.gamePath / "DoomMetalVol7.wad" - metalV6 = self.gamePath / "DoomMetalVol6.wad" - if metalV7.exists(): - baseFiles.append(str(metalV7)) - elif metalV6.exists(): - baseFiles.append(str(metalV6)) + if not isFunnyPack: + metalV7 = self.gamePath / "DoomMetalVol7.wad" + metalV6 = self.gamePath / "DoomMetalVol6.wad" + if metalV7.exists(): + baseFiles.append(str(metalV7)) + elif metalV6.exists(): + baseFiles.append(str(metalV6)) - # Add game-specific addons - baseFiles.extend(self.get_addon_files(gameType)) + # Get game-specific addons (but we'll modify if it's Funny Pack) + baseFiles.extend(self.get_addon_files(gameType, isFunnyPack)) return baseFiles def show_custom_deathmatch_dialog(self):