Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
23441c8b28 | ||
|
6124419d29 |
@ -1922,9 +1922,13 @@ class DoomLauncher(QMainWindow):
|
|||||||
"""Populate the game selection combo box"""
|
"""Populate the game selection combo box"""
|
||||||
gameList = [
|
gameList = [
|
||||||
"Toby Demo Map",
|
"Toby Demo Map",
|
||||||
|
"Funny Pack - Demo Map",
|
||||||
"Classic Doom",
|
"Classic Doom",
|
||||||
|
"Funny Pack - Classic Doom",
|
||||||
"Toby Doom",
|
"Toby Doom",
|
||||||
|
"Funny Pack - Toby Doom",
|
||||||
"OperationMDK",
|
"OperationMDK",
|
||||||
|
"Funny Pack - OperationMDK",
|
||||||
"Classic Heretic",
|
"Classic Heretic",
|
||||||
"Toby Heretic",
|
"Toby Heretic",
|
||||||
"Classic Hexen",
|
"Classic Hexen",
|
||||||
@ -1958,8 +1962,13 @@ class DoomLauncher(QMainWindow):
|
|||||||
|
|
||||||
return shutil.which("gzdoom")
|
return shutil.which("gzdoom")
|
||||||
|
|
||||||
def get_addon_files(self, game_type: str = "DOOM") -> List[str]:
|
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"""
|
"""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 = []
|
addonFiles = []
|
||||||
# MENU addons are common to all games
|
# MENU addons are common to all games
|
||||||
menuPath = self.gamePath / "Addons" / "MENU"
|
menuPath = self.gamePath / "Addons" / "MENU"
|
||||||
@ -1971,11 +1980,35 @@ class DoomLauncher(QMainWindow):
|
|||||||
if gamePath.exists():
|
if gamePath.exists():
|
||||||
if game_type == "HERETIC":
|
if game_type == "HERETIC":
|
||||||
pattern = "TobyHeretic*.pk3"
|
pattern = "TobyHeretic*.pk3"
|
||||||
|
addonFiles.extend(str(p) for p in gamePath.glob(pattern))
|
||||||
elif game_type == "HEXEN":
|
elif game_type == "HEXEN":
|
||||||
pattern = "TobyHexen*.pk3"
|
pattern = "TobyHexen*.pk3"
|
||||||
|
addonFiles.extend(str(p) for p in gamePath.glob(pattern))
|
||||||
else: # DOOM
|
else: # DOOM
|
||||||
pattern = "Toby*.pk3"
|
# Add normal Doom addons (but skip monster packs if using Funny Pack)
|
||||||
addonFiles.extend(str(p) for p in gamePath.glob(pattern))
|
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
|
return addonFiles
|
||||||
|
|
||||||
@ -1987,6 +2020,7 @@ class DoomLauncher(QMainWindow):
|
|||||||
|
|
||||||
baseFiles = [str(tobyMod)]
|
baseFiles = [str(tobyMod)]
|
||||||
selectedGame = self.gameCombo.currentText()
|
selectedGame = self.gameCombo.currentText()
|
||||||
|
isFunnyPack = "Funny Pack" in selectedGame
|
||||||
|
|
||||||
# Determine game type and get corresponding addons
|
# Determine game type and get corresponding addons
|
||||||
if "Heretic" in selectedGame:
|
if "Heretic" in selectedGame:
|
||||||
@ -2004,21 +2038,21 @@ class DoomLauncher(QMainWindow):
|
|||||||
elif "Toby Doom" in selectedGame:
|
elif "Toby Doom" in selectedGame:
|
||||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyDoomLevels.wad"))
|
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyDoomLevels.wad"))
|
||||||
musicRenamer = self.gamePath / "Toby-Doom-Level-Music-Renamer.pk3"
|
musicRenamer = self.gamePath / "Toby-Doom-Level-Music-Renamer.pk3"
|
||||||
if musicRenamer.exists():
|
if musicRenamer.exists() and not isFunnyPack:
|
||||||
baseFiles.append(str(musicRenamer))
|
baseFiles.append(str(musicRenamer))
|
||||||
elif "OperationMDK" in selectedGame:
|
elif "OperationMDK" in selectedGame:
|
||||||
baseFiles.append(str(self.gamePath / "OpMDK.wad"))
|
baseFiles.append(str(self.gamePath / "OpMDK.wad"))
|
||||||
|
|
||||||
# Add metal music mod if available (Doom only)
|
if not isFunnyPack:
|
||||||
metalV7 = self.gamePath / "DoomMetalVol7.wad"
|
metalV7 = self.gamePath / "DoomMetalVol7.wad"
|
||||||
metalV6 = self.gamePath / "DoomMetalVol6.wad"
|
metalV6 = self.gamePath / "DoomMetalVol6.wad"
|
||||||
if metalV7.exists():
|
if metalV7.exists():
|
||||||
baseFiles.append(str(metalV7))
|
baseFiles.append(str(metalV7))
|
||||||
elif metalV6.exists():
|
elif metalV6.exists():
|
||||||
baseFiles.append(str(metalV6))
|
baseFiles.append(str(metalV6))
|
||||||
|
|
||||||
# Add game-specific addons
|
# Get game-specific addons (but we'll modify if it's Funny Pack)
|
||||||
baseFiles.extend(self.get_addon_files(gameType))
|
baseFiles.extend(self.get_addon_files(gameType, isFunnyPack))
|
||||||
return baseFiles
|
return baseFiles
|
||||||
|
|
||||||
def show_custom_deathmatch_dialog(self):
|
def show_custom_deathmatch_dialog(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user