Reorganized how addons are found and added when loading games. As a side affect, fixed a major bug with the way the latest version of the game is loaded.

This commit is contained in:
Storm Dragon 2024-08-11 13:39:41 -04:00
parent cb1f5a7757
commit 4cd3123464
5 changed files with 20 additions and 9 deletions

View File

@ -6,7 +6,7 @@ export DIALOGOPTS='--no-lines --visit-items'
# Toby games path
gamePath=~/.local/games/doom
export gamePath=~/.local/games/doom
# Path where doom wads are stored
export doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
@ -17,19 +17,28 @@ export gzdoom="$(command -v gzdoom)"
export tobyVersion="7-5"
# Doom Addons
mapfile -t doomAddons < <(find "$gamePath/Addons/DOOM/" -type f -name "TobyV${tobyVersion%%-*}_*.pk3"
find "$gamePath/Addons/MENU/" -type f -name "TobyV${tobyVersion%%-*}_*.pk3"
)
# Heretic Addons
mapfile -t hereticAddons < <(find "$gamePath/Addons/HERETIC/" -type f -name "TobyHeretic*.pk3"
find "$gamePath/Addons/MENU/" -type f -name "TobyV${tobyVersion%%-*}_*.pk3"
)
doomGames=(
# Toby demo map
"TobyAccMod_V${tobyVersion}.pk3 Toby-Demo-Level.wad ""$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom Toby Demo Map"
"TobyAccMod_V${tobyVersion}.pk3 Toby-Demo-Level.wad ${doomAddons[*]}" "Freedoom Toby Demo Map"
# Unmodified Doom with accessibility.
"TobyAccMod_V${tobyVersion}.pk3 ""$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom"
"TobyAccMod_V${tobyVersion}.pk3 ${doomAddons[*]}" "Freedoom"
# Toby accessibility mods
"TobyAccMod_V${tobyVersion}.pk3 TobyDoomLevels.wad ""$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom Toby Delux Map Pack"
"TobyAccMod_V${tobyVersion}.pk3 TobyDoomLevels.wad ${doomAddons[*]}" "Freedoom Toby Delux Map Pack"
# OperationMDK
"TobyAccMod_V${tobyVersion}.pk3 OpMDK.wad ""$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom OperationMDK"
"TobyAccMod_V${tobyVersion}.pk3 OpMDK.wad ${doomAddons[*]}" "Freedoom OperationMDK"
# Unmodified Heretic with accessibility
"TobyAccMod_V${tobyVersion}.pk3 ""$gamePath/Addons/HERETIC/TobyHeretic"* "Classic Heretic"
"TobyAccMod_V${tobyVersion}.pk3 ${hereticAddons[*]}" "Classic Heretic"
# Heretic accessibility mods
"TobyAccMod_V${tobyVersion}.pk3 TobyHereticLevels.wad ""$gamePath/Addons/HERETIC/TobyHeretic"* "Toby Heretic"
"TobyAccMod_V${tobyVersion}.pk3 TobyHereticLevels.wad ${hereticAddons[*]}" "Toby Heretic"
"custom_game" "Custom Game"
)

View File

@ -7,6 +7,7 @@ gamePath=~/.local/games/doom
# Set up the pk3 and wad files
gameOption=(
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')"
"${gamePath}/TobyDeathArena_V1-0.wad"

View File

@ -7,6 +7,7 @@ gamePath=~/.local/games/doom
# Set up the pk3 and wad files
gameOption=(
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
"${gamePath}/OpMDK.wad"
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')"

View File

@ -8,7 +8,7 @@ gamePath=~/.local/games/doom
# Set up the pk3 and wad files
gameOption=(
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
"${gamePath}/PB-Toby-Compatibility-Addon.pk3"
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
"${gamePath}/TobyDoomLevels.wad"
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')"

View File

@ -8,7 +8,7 @@ gamePath=~/.local/games/doom
# Set up the pk3 and wad files
gameOption=(
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
"${gamePath}/PB-Toby-Compatibility-Addon.pk3"
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
"${gamePath}/Toby-Demo-Level.wad"
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')"