Merge branch 'testing' latest work on Toby Doom Accessibility Mod.

This commit is contained in:
Storm Dragon 2024-08-11 00:03:41 -04:00
commit 870185f83d
9 changed files with 248 additions and 154 deletions

View File

@ -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)"
@ -12,28 +14,34 @@ export doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
export gzdoom="$(command -v gzdoom)"
# Version of the accessibility mod
export tobyVersion="7-0"
export tobyVersion="7-5"
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"
# Unmodified Heretic with accessibility
"TobyAccMod_V${tobyVersion}.pk3 ""$gamePath/Addons/HERETIC/TobyHeretic"* "Classic Heretic"
# Heretic accessibility mods
"TobyAccMod_V${tobyVersion}.pk3 TobyHereticLevels.wad ""$gamePath/Addons/HERETIC/TobyHeretic"* "Toby Heretic"
"custom_game" "Custom Game"
)
export antiGrepStrings=(
'-E' '-v'
'-e' '^Resolution:'
'-e' '^READMe(\d+).*'
)
export grepStrings=(
'-E'
'-e' '^\[Toby Accessibility Mod\]'
'-e' '^[A-Z][0-9a-z]+: .+'
'-e' 'is now known as'
'-e' '.+ punched .+ to death\.'
@ -57,6 +65,8 @@ export grepStrings=(
)
export sedStrings=(
'-e' 's/^\[Toby Accessibility Mod\] M_/[Toby Accessibility Mod] /'
'-e' 's/^\[Toby Accessibility Mod\] //'
'-e' 's/"cl_run" = "true"/run/'
'-e' 's/"cl_run" = "false"/walk/'
'-e' 's:.*/:Game saved. (:'
@ -94,9 +104,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 +114,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 +199,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 +251,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

124
.scripts/TobyCustom/' Normal file
View File

@ -0,0 +1,124 @@
#!/usr/bin/env bash
pushd "$doomPath"
# Set up the pk3 and wad files
gameOption=(
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
"${doomPath}/PB-Toby-Compatibility-Addon.pk3"
"${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3"
"${doomPath}/TobyDeathArena_V1-0.wad"
)
# Death match setup
ipAddress="$(dialog --backtitle "Deathmatch Options" \
--clear \
--no-tags \
--ok-label "Join" \
--cancel-label "Exit" \
--extra-button \
--extra-label "Host" \
--inputbox "Enter ip or URL, required for join." -1 -1 --stdout)"
buttonCode=$?
[[ $buttonCode -eq 1 ]] && exit 0
if [[ $buttonCode -eq 0 ]]; then
if [[ "${#ipAddress}" -lt 3 ]]; then
dialog --backtitle "Deathmatch" --clear --msgbox "No ip address or URL given." -1 -1 --stdout
exit 1
fi
flags=('-join' "${ipAddress}")
else
# List of maps included:
maps=(
"1" "Com Station (2-4 players)"
"2" "Warehouse (2-4 players)"
"3" "Sector 3 (2-4 players)"
"4" "Dungeon of Doom (2-4 players)"
"5" "Ocean Fortress (2-4 players)"
"6" "Water Treatment Facility (2-4 players)"
"7" "Phobos Base Site 4 (2-4 players)"
"8" "Hangar Bay 18 (2-4 players)")
# Array of how many players a given map supports in dialog rangebox syntax
declare -a mapPlayers=(
[1]="2 4"
[2]="2 4"
[3]="2 4"
[4]="2 4"
[5]="2 4"
[6]="2 4"
[7]="2 4"
[8]="2 4")
map="$(dialog --backtitle "Select Map" \
--clear \
--no-tags \
--cancel-label "Exit" \
--ok-label "Next" \
--menu "Please select one" 0 0 0 "${maps[@]}" --stdout)"
fraglimit="$(dialog --backtitle "Fraglimit" \
--clear \
--ok-label "Next" \
--cancel-label "Exit" \
--rangebox "Select Fraglimit" -1 -1 1 500 20 --stdout)"
[[ $? -eq 1 ]] && exit 0
# Get ip address
yourIpAddress="$(curl -4s https://icanhazip.com)"
players="$(dialog --backtitle "Host Deathmatch Game" \
--clear \
--ok-label "Next" \
--cancel-label "Exit" \
--rangebox "Select number of players. Remember to give them your IP address: ${yourIpAddress}" -1 -1 ${mapPlayers[$map]} --stdout)"
[[ $? -eq 1 ]] && exit 0
skillLevel="$(dialog --backtitle "Host Deathmatch Game" \
--clear \
--ok-label "Start" \
--cancel-label "Exit" \
--extra-button \
--extra-label "Bots Only" \
--rangebox "Select difficulty. 1 easiest, 5 hardest." -1 -1 1 5 3 --stdout)"
code=$?
[[ $code -eq 1 ]] && exit 0
if [[ $code -eq 3 ]]; then
players=1
dialog --backtitle "Preparing to Launch" \
--msgbox "When the game starts, press \` to open the console. Type addbot, press enter. Repeat addbot for as many bots as you would like. Press \` again to close the console." -1 -1 --stdout
fi
flags=(
'-host' "${players}"
'-skill' "${skillLevel}"
'-deathmatch'
'+set' 'sv_cheats' '1'
'+fraglimit' "$fraglimit"
'+dmflags' '16384' '+dmflags' '4' '+dmflags' '128' '+dmflags' '4096'
'+dmflags2' '512' '+dmflags2' '1024'
'-extratic' '-dup' '3'
'-warp' "$map"
)
fi
# Check for and include if present a wad. Some people may not have it.
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
gameOption+=" DoomMetalVol7.wad"
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
gameOption+=" DoomMetalVol6.wad"
fi
# Extend the search for new messages to be read.
grepStrings+=('-e' ' died.'
'-e' 'Ectoplasmic Surge!'
'-e' ' has been '
'-e' '^(Armor|Health) boosted!'
'-e' 'Lesser demon energy'
'-e' '^Found '
'-e' 'Got the '
'-e' 'Picked up '
'-e' '^(Mega|Soul)sphere$'
'-e' '^Took '
'-e' ' was .*(\.|!)'
'-e' '^Vanguard of the gods!$'
'-e' "You've found "
'-e' 'You (collected|got|found|picked up) ')
# Launch the game and pipe things to be spoken through speech-dispatcher.
# This also leaves the console output intact for people who may want to read it.
exec stdbuf -oL ${gzdoom} ${gameOption[@]} "${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} -- > /dev/null 2>&1; }; echo "$l";done

View File

@ -0,0 +1,35 @@
# Extend the search for new messages to be read.
grepStrings+=('-e' '^\*\*\* Brutality Bonus awarded!'
'-e' '^\+[0-9]+ '
'-e' '^A backpack for all your ammo storage needs!$'
'-e' '^Area survey map.$'
'-e' ' died.'
'-e' 'Ectoplasmic Surge!'
'-e' '^Game Saved.'
'-e' ' has been '
'-e' '^(Armor|Health) boosted!'
'-e' '(Greater|Lesser) demon energy'
'-e' '^Found '
'-e' 'Got the '
'-e' ' killed (her|him|it)self(\.|!)'
'-e' '^Low-light goggles.$'
'-e' '^Picked up '
'-e' '^Press '
'-e' 'Rescue operations suit.'
'-e' '^(Mega|Soul|Invulnerability )[Ss]phere!$'
'-e' '^Mancubus '
'-e' ' skeleton key secured!$'
'-e' ' \(Slot [0-9]+\)'
'-e' ' (SPLATTERED|was) .*(\.|!)'
'-e' ' Swiss Cheese '
'-e' '^Took '
'-e' '^Vanguard of the gods!$'
'-e' "You've found "
'-e' 'You (collected|got|found|picked up) ')
antiGrepStrings+=('-e' 'key card'
'-e' ' was .*\?'
)
sedStrings+=('-e' 's/*\{3\}//g'
'-e' 's/^+//')

View File

@ -2,18 +2,14 @@
pushd "$doomPath"
# Add all the TobyDoom stuff we need, exclude things we do not.
mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
-not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
-not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3"
)
gamePath=~/.local/games/doom
# Set up the pk3 and wad files
gameOption=(
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
${addons[@]}
"${doomPath}/TobyDeathArena_V1-0.wad"
"$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')"
"${gamePath}/TobyDeathArena_V1-0.wad"
)
# Death match setup
@ -102,22 +98,15 @@ else
fi
# Check for and include if present a wad. Some people may not have it.
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
# Extend the search for new messages to be read.
grepStrings+=('-e' 'New PDA Entry:'
'-e' ' died.'
'-e' ' has been '
'-e' ' killed '
'-e' 'Lesser demon energy'
'-e' ' was '
'-e' 'Got the '
'-e' "You've found "
'-e' 'Slot ')
# Source common variable extensions.
pbrc="$(find "${0%/*}/" -type f -name '.projectbrutalityrc')"
source "${pbrc}"
# Launch the game and pipe things to be spoken through speech-dispatcher.
# This also leaves the console output intact for people who may want to read it.

View File

@ -3,36 +3,25 @@
# Set the current path to the Doom path required by some OS.
pushd "${doomPath}"
# Add all the TobyDoom stuff we need, exclude things we do not.
mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
-not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
-not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3"
-not -iname "TobyV${tobyVersion%%-*}_Guns.pk3"
)
gamePath=~/.local/games/doom
# Set up the pk3 and wad files
gameOption=(
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
"${gamePath}/OpMDK.wad"
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
${addons[@]}
"${doomPath}/PB-Toby-Compatibility-Addon.pk3"
"${doomPath}/OpMDK.wad"
"$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')"
)
# Check for and include if present a wad. Some people may not have it.
if [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
gameOption+=("${doomPath}/DoomMetalVol6.wad")
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
gameOption+=("${gamePath}/DoomMetalVol7.wad")
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
gameOption+=("${gamePath}/DoomMetalVol6.wad")
fi
# Extend the search for new messages to be read.
grepStrings+=('-e' 'New PDA Entry:'
'-e' ' died.'
'-e' ' has been '
'-e' 'Lesser demon energy'
'-e' 'Got the '
'-e' '^\([^?]*\)\(was\)\([^?]*\)$'
'-e' "You've found "
'-e' 'Slot ')
# Source common variable extensions.
pbrc="$(find "${0%/*}/" -type f -name '.projectbrutalityrc')"
source "${pbrc}"
# Launch the game and pipe things to be spoken through speech-dispatcher.
# This also leaves the console output intact for people who may want to read it.

View File

@ -3,36 +3,27 @@
# Set the current path to the Doom path required by some OS.
pushd "${doomPath}"
# Add all the TobyDoom stuff we need, exclude things we do not.
mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
-not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
-not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3"
)
# Set up the pk3 and wad files
gamePath=~/.local/games/doom
# Set up the pk3 and wad files
gameOption=(
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
"${gamePath}/PB-Toby-Compatibility-Addon.pk3"
"${gamePath}/TobyDoomLevels.wad"
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
${addons[@]}
"${doomPath}/TobyDoomLevels.wad"
"$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')"
)
# Check for and include if present a wad. Some people may not have it.
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
gameOption+=" DoomMetalVol7.wad"
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
gameOption+=" DoomMetalVol6.wad"
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
gameOption+=("${gamePath}/DoomMetalVol7.wad")
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
gameOption+=("${gamePath}/DoomMetalVol6.wad")
fi
# Extend the search for new messages to be read.
grepStrings+=('-e' 'New PDA Entry:'
'-e' ' died.'
'-e' ' has been '
'-e' 'Lesser demon energy'
'-e' 'Got the '
'-e' '^\([^?]*\)\(was\)\([^?]*\)$'
'-e' "You've found "
'-e' 'Slot ')
# Source common variable extensions.
pbrc="$(find "${0%/*}/" -type f -name '.projectbrutalityrc')"
source "${pbrc}"
# Launch the game and pipe things to be spoken through speech-dispatcher.
# This also leaves the console output intact for people who may want to read it.

View File

@ -3,36 +3,27 @@
# Set the current path to the Doom path required by some OS.
pushd "${doomPath}"
# Add all the TobyDoom stuff we need, exclude things we do not.
mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
-not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
-not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3"
)
# Set up the pk3 and wad files
gamePath=~/.local/games/doom
# Set up the pk3 and wad files
gameOption=(
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
"${gamePath}/PB-Toby-Compatibility-Addon.pk3"
"${gamePath}/Toby-Demo-Level.wad"
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
${addons[@]}
"${doomPath}/Toby-Demo-Level.wad"
"$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')"
)
# Check for and include if present a wad. Some people may not have it.
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
gameOption+=" DoomMetalVol7.wad"
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
gameOption+=" DoomMetalVol6.wad"
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
gameOption+=("${gamePath}/DoomMetalVol7.wad")
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
gameOption+=("${gamePath}/DoomMetalVol6.wad")
fi
# Extend the search for new messages to be read.
grepStrings+=('-e' 'New PDA Entry:'
'-e' ' died.'
'-e' ' has been '
'-e' 'Lesser demon energy'
'-e' 'Got the '
'-e' '^\([^?]*\)\(was\)\([^?]*\)$'
'-e' "You've found "
'-e' 'Slot ')
# Source common variable extensions.
pbrc="$(find "${0%/*}/" -type f -name '.projectbrutalityrc')"
source "${pbrc}"
# Launch the game and pipe things to be spoken through speech-dispatcher.
# This also leaves the console output intact for people who may want to read it.

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
# Set the current path to the Doom path required by some OS.
pushd "${doomPath}"
# Add all the TobyDoom stuff we need, exclude things we do not.
mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
-not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
-not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3"
)
# Set up the pk3 and wad files
gameOption=(
"$(find "${doomPath}" -iname 'Xim-StarWars*.pk3')"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
${addons[@]}
"${doomPath}/TobyDoomLevels.wad"
)
# Check for and include if present a wad. Some people may not have it.
if [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
gameOption+=("${doomPath}/DoomMetalVol6.wad")
fi
# Extend the search for new messages to be read.
grepStrings+=('-e' 'New PDA Entry:'
'-e' ' died.'
'-e' ' has been '
'-e' 'Lesser demon energy'
'-e' 'Got the '
'-e' "You've found "
'-e' 'Slot ')
# Launch the game and pipe things to be spoken through speech-dispatcher.
# This also leaves the console output intact for people who may want to read it.
exec stdbuf -oL ${gzdoom} ${gameOption[@]} | 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} -- > /dev/null 2>&1; }; echo "$l";done

View File

@ -677,13 +677,14 @@ case "${game}" in
add_launcher "${installPath}/FS2_2.7_Linux/fs2.x86_64" "-ESpeakApplication=espeak-ng"
;;
"Freedoom")
tobyVersion="7-0"
tobyVersion="7-5"
mkdir -p "${installPath}/doom"
doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null)"
if [[ ${#doomPath} -lt 5 ]]; then
dialog --backtitle "Linux Game Manager" \
--yesno "Do you want Linux Game Manager to install freedoom and gzdoom for you? If you want to do this manually, select no." -1 -1 --stdout || exit 0
if command -v yay &> /dev/null ; then
yay -Sy --noconfirm --sudoloop freedoom gzdoom freedm
yay -Sy --noconfirm --sudoloop freedoom gzdoom freedm blasphemer-wad
elif command -v slapt-src &> /dev/null ; then
su -c 'slapt-src -i freedoom gzdoom'
elif command -v dnf &> /dev/null ; then
@ -696,7 +697,7 @@ case "${game}" in
fi
fi
doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
if ! [[ -e "${doomPath}/DoomMetalVol6.wad" ]] && ! [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
if ! [[ -e "${installPath}/doom/DoomMetalVol6.wad" ]] && ! [[ -e "${installPath}/doom/DoomMetalVol7.wad" ]]; then
alert
dialog --backtitle "Linux Game manager" \
--extra-button \
@ -715,22 +716,22 @@ case "${game}" in
fi
# The url breaks the normal download function
download_named "keyshare-universal.pk3" "https://forum.zdoom.org/download/file.php?id=42262"
download "${ipfsGateway}/ipfs/QmW5xfL2Z3PQvwKyU34nFLr31dLNZaghjPc68VsA6hFjZD?filename=TobyAccessibilityMod_Version${tobyVersion}.zip" "${ipfsGateway}/ipfs/QmSKgXKDgu6z4NoDt6GWMhDSin8ABpd7oQDj6Tqsfk7xhQ?filename=OpMDK_ForV7-0.zip"
echo "The next step may require your password."
echo "It is necessary to move the extracted files into their proper place."
alert
[[ -e "${cache}/DoomMetalVol6.wad" ]] && sudo mv "${cache}/DoomMetalVol6.wad" "${doomPath}/"
[[ -e "${cache}/DoomMetalVol7.wad" ]] && sudo mv "${cache}/DoomMetalVol7.wad" "${doomPath}/"
sudo unzip -n -d "${doomPath}" "${cache}/TobyAccessibilityMod_Version${tobyVersion}.zip"
sudo unzip -n -d "${doomPath}" "${cache}/OpMDK_ForV7-0.zip"
sudo cp -v "${cache}/keyshare-universal.pk3" "${doomPath}"
sudo rm -fv "${doomPath}/"*.{bat,exe}
download "${ipfsGateway}/ipfs/QmNtn1bugWQg2Y8rB29FH6zYzthsebxmpuMcHcErprzx3z?filename=TobyAccessibilityMod_Version${tobyVersion}.zip" "${ipfsGateway}/ipfs/QmNUfYa5P9J6EaDZoGvsiG2ArMR3BCc3gTcW3wPo1HABLU?filename=OpMDK_ForV${tobyVersion}.zip"
[[ -e "${cache}/DoomMetalVol6.wad" ]] && mv "${cache}/DoomMetalVol6.wad" "${installPath}/doom"
[[ -e "${cache}/DoomMetalVol7.wad" ]] && mv "${cache}/DoomMetalVol7.wad" "${installPath}/doom"
unzip -n -d "${installPath}/doom" "${cache}/TobyAccessibilityMod_Version${tobyVersion}.zip"
unzip -n -d "${installPath}/doom" "${cache}/OpMDK_ForV7-0.zip"
cp -v "${cache}/keyshare-universal.pk3" "${installPath}/doom"
rm -fv "${installPath}/doom/"*.{bat,dll,exe}
if [[ -e /usr/share/doom/blasphem.wad ]]; then
ln -s /usr/share/doom/blasphem.wad "${installPath}/doom/"
fi
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom"
cp "${doomPath}/TobyConfig.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
cp "${doomPath}/zcajun/bots.cfg" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/"
sed -i "s;^\[IWADSearch.Directories\]$;[IWADSearch.Directories]\nPath=${doomPath};" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
sed -i "s;^\[FileSearch.Directories\]$;[FileSearch.Directories]\nPath=${doomPath};" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
sed -i "s;^\[SoundfontSearch.Directories\]$;[SoundfontSearch.Directories]\nPath=${doomPath}/fm_banks\nPath=${doomPath}/soundfonts;" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
cp "${installPath}/doom/TobyConfig.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
cp "${installPath}/doom/zcajun/bots.cfg" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/"
sed -i "s;^\[IWADSearch.Directories\]$;[IWADSearch.Directories]\nPath=${doomPath}\nPath=${installPath}/doom;" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
sed -i "s;^\[FileSearch.Directories\]$;[FileSearch.Directories]\nPath=${doomPath}\nPath=${installPath}/doom;" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
sed -i "s;^\[SoundfontSearch.Directories\]$;[SoundfontSearch.Directories]\nPath=${doomPath}/fm_banks\nPath=${doomPath}/soundfonts\nPath=${installPath}/doom/soundfonts;" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
# sed -i 's/Mouse1=+attack/CTRL=+attack/' "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
launcherPath="$(readlink -f "$0")"
launcherPath="${launcherPath%/*}"