Fixed a but with how files were loaded. This should improve both game sounds and the reliability of the near by object reporting.
This commit is contained in:
@@ -2089,21 +2089,8 @@ class DoomLauncher(QMainWindow):
|
||||
use_funny_pack: Whether to use the Funny Pack instead of normal monsters
|
||||
"""
|
||||
addonFiles = []
|
||||
# MENU addons in specific order for V9.0
|
||||
menuPath = self.gamePath / "Addons" / "MENU"
|
||||
if menuPath.exists():
|
||||
# Add menu files in order
|
||||
menu_addons = [
|
||||
"TobyV9_SimpleMenu.pk3",
|
||||
f"TobySoundDirectory_{game_type}.pk3"
|
||||
]
|
||||
|
||||
for addon in menu_addons:
|
||||
addon_path = menuPath / addon
|
||||
if addon_path.exists():
|
||||
addonFiles.append(str(addon_path))
|
||||
|
||||
# Game specific addons
|
||||
|
||||
# Game specific addons first (following bat file order)
|
||||
gamePath = self.gamePath / "Addons" / game_type
|
||||
if gamePath.exists():
|
||||
if game_type == "HERETIC":
|
||||
@@ -2135,7 +2122,7 @@ class DoomLauncher(QMainWindow):
|
||||
if addon_path.exists():
|
||||
addonFiles.append(str(addon_path))
|
||||
else: # DOOM
|
||||
# Add Doom addons in specific order for V9.0
|
||||
# Add Doom addons in specific order matching bat file
|
||||
doom_addons = [
|
||||
"TobyV8_Guns.pk3",
|
||||
"TobyV7_Monsters.pk3" if not use_funny_pack else None,
|
||||
@@ -2163,10 +2150,20 @@ class DoomLauncher(QMainWindow):
|
||||
"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))
|
||||
|
||||
# MENU addons after game addons (following bat file order)
|
||||
menuPath = self.gamePath / "Addons" / "MENU"
|
||||
if menuPath.exists():
|
||||
# Add menu files in order
|
||||
menu_addons = [
|
||||
"TobyV9_SimpleMenu.pk3",
|
||||
f"TobySoundDirectory_{game_type}.pk3"
|
||||
]
|
||||
|
||||
for addon in menu_addons:
|
||||
addon_path = menuPath / addon
|
||||
if addon_path.exists():
|
||||
addonFiles.append(str(addon_path))
|
||||
|
||||
return addonFiles
|
||||
|
||||
@@ -2183,35 +2180,45 @@ class DoomLauncher(QMainWindow):
|
||||
# Determine game type and get corresponding addons
|
||||
if "Heretic" in selectedGame:
|
||||
gameType = "HERETIC"
|
||||
elif "Hexen" in selectedGame:
|
||||
gameType = "HEXEN"
|
||||
else: # Doom games
|
||||
gameType = "DOOM"
|
||||
|
||||
# Get game-specific addons first (following bat file order)
|
||||
baseFiles.extend(self.get_addon_files(gameType, isFunnyPack))
|
||||
|
||||
# Then add maps and other game-specific files
|
||||
if "Heretic" in selectedGame:
|
||||
if "Toby Heretic" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyHereticLevels.wad"))
|
||||
elif "Hexen" in selectedGame:
|
||||
gameType = "HEXEN"
|
||||
if "Toby Hexen" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyHexen.pk3"))
|
||||
else: # Doom games
|
||||
gameType = "DOOM"
|
||||
if "Toby Doom" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyDoomLevels.pk3"))
|
||||
musicRenamer = self.gamePath / "Toby-Doom-Level-Music-Renamer.pk3"
|
||||
if musicRenamer.exists() and not isFunnyPack:
|
||||
baseFiles.append(str(musicRenamer))
|
||||
elif "OperationMDK" in selectedGame:
|
||||
if "OperationMDK" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "OpMDK.wad"))
|
||||
|
||||
if not isFunnyPack:
|
||||
metalV10 = self.gamePath / "DOOM Metal X IDKFA Soundtrack.pk3"
|
||||
metalV7 = self.gamePath / "DoomMetalVol7.wad"
|
||||
metalV6 = self.gamePath / "DoomMetalVol6.wad"
|
||||
if metalV10.exists():
|
||||
baseFiles.append(str(metalV10))
|
||||
elif metalV7.exists():
|
||||
baseFiles.append(str(metalV7))
|
||||
elif metalV6.exists():
|
||||
baseFiles.append(str(metalV6))
|
||||
if "Toby Doom" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyDoomLevels.pk3"))
|
||||
|
||||
# Add music files at the end for Doom games
|
||||
if gameType == "DOOM" and not isFunnyPack:
|
||||
metalV10 = self.gamePath / "DOOM Metal X IDKFA Soundtrack.pk3"
|
||||
metalV7 = self.gamePath / "DoomMetalVol7.wad"
|
||||
metalV6 = self.gamePath / "DoomMetalVol6.wad"
|
||||
if metalV10.exists():
|
||||
baseFiles.append(str(metalV10))
|
||||
elif metalV7.exists():
|
||||
baseFiles.append(str(metalV7))
|
||||
elif metalV6.exists():
|
||||
baseFiles.append(str(metalV6))
|
||||
|
||||
if "Toby Doom" in selectedGame:
|
||||
musicRenamer = self.gamePath / "Toby-Doom-Level-Music-Renamer.pk3"
|
||||
if musicRenamer.exists():
|
||||
baseFiles.append(str(musicRenamer))
|
||||
|
||||
# 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):
|
||||
|
Reference in New Issue
Block a user