Attempt to place things not controlled by package managers in ~/.local/games.
This commit is contained in:
@ -5,6 +5,8 @@ DIALOG_ITEM_HELP=""
|
||||
export DIALOGOPTS='--no-lines --visit-items'
|
||||
|
||||
|
||||
# Toby games path
|
||||
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,13 +19,13 @@ export tobyVersion="7-0"
|
||||
|
||||
doomGames=(
|
||||
# Toby demo map
|
||||
"TobyAccMod_V${tobyVersion}.pk3 Toby-Demo-Level.wad ""$doomPath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom Toby Demo Map"
|
||||
"TobyAccMod_V${tobyVersion}.pk3 Toby-Demo-Level.wad ""$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom Toby Demo Map"
|
||||
# Unmodified Doom with accessibility.
|
||||
"TobyAccMod_V${tobyVersion}.pk3 ""$doomPath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom"
|
||||
"TobyAccMod_V${tobyVersion}.pk3 ""$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom"
|
||||
# Toby accessibility mods
|
||||
"TobyAccMod_V${tobyVersion}.pk3 TobyDoomLevels.wad ""$doomPath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom Toby Delux Map Pack"
|
||||
"TobyAccMod_V${tobyVersion}.pk3 TobyDoomLevels.wad ""$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom Toby Delux Map Pack"
|
||||
# OperationMDK
|
||||
"TobyAccMod_V${tobyVersion}.pk3 OpMDK.wad ""$doomPath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom OperationMDK"
|
||||
"TobyAccMod_V${tobyVersion}.pk3 OpMDK.wad ""$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "Freedoom OperationMDK"
|
||||
"custom_game" "Custom Game"
|
||||
)
|
||||
|
||||
@ -94,9 +96,9 @@ gameOption="$(dialog --backtitle "Select your Doom!" \
|
||||
--help-label "Exit" \
|
||||
--menu "Please select one" 0 0 0 "${doomGames[@]}" --stdout)"
|
||||
buttonCode=$?
|
||||
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
|
||||
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
|
||||
gameOption+=" DoomMetalVol7.wad"
|
||||
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
|
||||
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
|
||||
gameOption+=" DoomMetalVol6.wad"
|
||||
fi
|
||||
|
||||
@ -104,7 +106,7 @@ case ${buttonCode} in
|
||||
1)
|
||||
# Death match setup
|
||||
# Ignore the choice of map made above
|
||||
gameOption="${doomPath}/TobyAccMod_V${tobyVersion}.pk3 ${doomPath}/TobyDeathArena_V1-0.wad ""$doomPath/Addons/TobyV${tobVersion%%-*}_"*
|
||||
gameOption="${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/TobyDeathArena_V1-0.wad ""$gamePath/Addons/TobyV${tobVersion%%-*}_"*
|
||||
ipAddress="$(dialog --backtitle "Deathmatch Options" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
@ -189,7 +191,7 @@ case ${buttonCode} in
|
||||
)
|
||||
fi
|
||||
pushd "$doomPath"
|
||||
exec stdbuf -oL ${gzdoom} ${gameOption} "$doomPath/Addons/TobyV${tobyVersion%%-*}_"* "${flags[@]}" | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | grep "${antiGrepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} --; } ; echo "$l";done
|
||||
exec stdbuf -oL ${gzdoom} ${gameOption} "$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "${flags[@]}" | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | grep "${antiGrepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} --; } ; echo "$l";done
|
||||
;;
|
||||
2)
|
||||
# Exit was pressed, so exit.
|
||||
@ -241,7 +243,7 @@ case ${buttonCode} in
|
||||
)
|
||||
fi
|
||||
pushd "${doomPath}"
|
||||
exec stdbuf -oL ${gzdoom} ${gameOption} "$doomPath/Addons/TobyV${tobyVersion%%-*}_"* "${flags[@]}" | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | grep "${antiGrepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} --; } ; echo "$l";done
|
||||
exec stdbuf -oL ${gzdoom} ${gameOption} "$gamePath/Addons/TobyV${tobyVersion%%-*}_"* "${flags[@]}" | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | grep "${antiGrepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} --; } ; echo "$l";done
|
||||
;;
|
||||
0)
|
||||
if [[ "${gameOption%% *}" == "custom_game" ]]; then
|
||||
|
Reference in New Issue
Block a user