More fixups to freedoom launcher

This commit is contained in:
Michael Taboada 2023-11-10 16:40:01 -08:00
parent cf69473757
commit e64ad81a19
2 changed files with 7 additions and 14 deletions

View File

@ -17,11 +17,11 @@ tobyVersion="6-1"
doomGames=(
# Unmodified Doom with accessibility.
"${gzdoom} ${doomPath}/TobyAccMod_V${tobyVersion}.pk3" "FreeDoom"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3" "FreeDoom"
# Toby accessibility mods
"${gzdoom} ${doomPath}/TobyAccMod_V${tobyVersion}.pk3 ${doomPath}/TobyDoomLevels.wad" "Freedoom Toby Mod"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3 ${doomPath}/TobyDoomLevels.wad" "Freedoom Toby Mod"
# OperationMDK
"${gzdoom} ${doomPath}/TobyAccMod_V${tobyVersion}.pk3 ${doomPath}/OpMDK.wad" "Freedoom OperationMDK"
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3 ${doomPath}/OpMDK.wad" "Freedoom OperationMDK"
)
grepStrings=(
@ -84,9 +84,7 @@ case ${buttonCode} in
dialog --backtitle "Co-op" --clear --msgbox "No ip address or URL given." -1 -1 --stdout
exit 1
fi
flags=(
#"${doomPath}/SiC_v1_01.pk3"
'-join' "${ipAddress}")
flags=('-join' "${ipAddress}")
else
# Get ip address
yourIpAddress="$(curl -4s https://icanhazip.com)"
@ -103,24 +101,21 @@ case ${buttonCode} in
--rangebox "Select difficulty. 1 easiest, 5 hardest." -1 -1 1 5 3 --stdout)"
[[ $? -eq 1 ]] && exit 0
flags=(
#"${doomPath}/SiC_v1_01.pk3"
'-host' "${players}"
'-skill' "${skillLevel}"
'+set' 'sv_cheats' '1'
'+set' 'sv_weaponsstay' '1'
'+set' 'sv_respawnprotect' '1'
'+set' 'sv_itemrespawn' '1'
#'+set' 'sv_itemrespawn' '1'
'+set' 'sv_respawnsuper' '1'
#'+set' 'sv_SiC_AlwaysWeaponShare' '1'
#'+set' 'sv_SiC_ShareKeys' '1'
'+set' 'alwaysapplydmflags' ''1
'-extratic' '-dup' '3'
)
fi
exec stdbuf -oL ${gameOption} "${flags[@]}" | stdbuf -oL grep "${grepStrings[@]}" | stdbuf -oL sed "${sedStrings[@]}" | spd-say -e
exec stdbuf -oL ${gzdoom} ${gameOption} "${flags[@]}" | stdbuf -oL grep "${grepStrings[@]}" | stdbuf -oL sed "${sedStrings[@]}" | spd-say -e
;;
0)
exec stdbuf -oL ${gameOption} | stdbuf -oL grep "${grepStrings[@]}" | stdbuf -oL sed "${sedStrings[@]}" | spd-say -e
exec stdbuf -oL ${gzdoom} ${gameOption} | stdbuf -oL grep "${grepStrings[@]}" | stdbuf -oL sed "${sedStrings[@]}" | spd-say -e
;;
esac

View File

@ -652,14 +652,12 @@ case "${game}" in
fi
doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
get_installer "OperationMDK.zip" "https://www.dropbox.com/scl/fi/bac94s01bl31p6e73pbof/OperationMDK.zip?rlkey=6ufdqgyacakqz6ulr2cue6rtm&dl=0"
#get_installer "SiC_v1_01.pk3" "https://forum.zdoom.org/download/file.php?id=36045"
download "https://www.dropbox.com/s/uf01fx3vydua6zx/TobyAccessibilityMod_Version${tobyVersion}.zip?dl=0"
echo "The next step may require your password."
echo "It is necessary to places the extracted files in their proper place."
alert
sudo unzip -d "${doomPath}" "${cache}/TobyAccessibilityMod_Version${tobyVersion}.zip"
sudo unzip -d "${doomPath}" "${cache}/OperationMDK.zip"
#sudo cp -v "${cache}/SiC_v1_01.pk3" "${doomPath}"
sudo rm -fv "${doomPath}/"*.lnk
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom"
cp "${doomPath}/gzdoom.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/"