From 39f8c3c29ce398fdd17b669d5549183418abed1d Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 18 Apr 2024 16:18:38 -0400 Subject: [PATCH] Provide option for Metal mods 6 or 7. --- linux-game-manager.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/linux-game-manager.sh b/linux-game-manager.sh index d219d49..7419b41 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -687,11 +687,22 @@ case "${game}" in fi fi doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)" - if ! [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then + if ! [[ -e "${doomPath}/DoomMetalVol6.wad" ]] && ! [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then alert - if dialog --backtitle "Linux Game manager" --yesno "Would you like Doom Metal Volume 6?" -1 -1 --stdout ; then + dialog --backtitle "Linux Game manager" \ + --extra-button \ + --yes-label "6" \ + --no-label "7" \ + --extra-label "None" \ + --yesno "Would you like Doom Metal Volume 6 or 7? Use arrow keys to select your answer." \ + -1 -1 --stdout + buttonCode=$? + if [[ $buttonCode -eq 0 ]]; then download "${ipfsGateway}/ipfs/QmSzWKtP3wPvzn5GNd9F7n4RAhkFHxh2UHxXGefiAufwQW?filename=DoomMetalVol6.wad" fi + if [[ $buttonCode -eq 1 ]]; then + download "${ipfsGateway}/ipfs/QmfXkz3tzicKGfhcYSiWUZkjkDKP2aVp53Y49n127wMr7D?filename=DoomMetalVol7.wad" + fi fi # The url breaks the normal download function download_named "keyshare-universal.pk3" "https://forum.zdoom.org/download/file.php?id=42262" @@ -700,6 +711,7 @@ case "${game}" in 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}"