From f72f9af100d3c26d6dd97514ea110d38ddd1ed93 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 30 Aug 2024 18:20:53 -0400 Subject: [PATCH] Dependency checking added for WolfenDoom. --- .scripts/TobyCustom/WolfenDoom.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 .scripts/TobyCustom/WolfenDoom.sh diff --git a/.scripts/TobyCustom/WolfenDoom.sh b/.scripts/TobyCustom/WolfenDoom.sh new file mode 100755 index 0000000..6707f39 --- /dev/null +++ b/.scripts/TobyCustom/WolfenDoom.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# check for required pk3. +source ${0%/*}/TobyCustom/.dependencies +check_dependencies "${gamePath}/Addons/WOLFENDOOM/orig_enh.pk3" \ + "https://www.moddb.com/mods/wolfendoom/downloads/wolfendoom-enhanced" \ + "mkdir -p ${gamePath}/Addons/WOLFENDOOM/" \ + "Place all pk3 files from the zip archive in:" \ + "${gamePath}/Addons/WOLFENDOOM/" \ + "There should be three of them noct_enh.pk3, orig_enh.pk3, and sod_enh.pk3" + +# Set up the pk3 and wad files +gameOption=( + "${gamePath}/TobyAccMod_V${tobyVersion}.pk3" + "$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"* + "$gamePath/Addons/DOOM/TobyV${tobyVersion%%-*}_Proximity.pk3" +) + +menuList=("${gamePath}/Addons/WOLFENDOOM/orig_enh.pk3" "WolfenDoom" + "${gamePath}/Addons/WOLFENDOOM/sod_enh.pk3" "WolfenDoom - Spear of Destiny" + "${gamePath}/Addons/WOLFENDOOM/noct_enh.pk3" "WolfenDoom - Nocturne" +) + +pk3=$(dialog --backtitle "Select Game" \ + --clear \ + --no-tags \ + --cancel-label "Exit" \ + --ok-label "Next" \ + --menu "Please select one" 0 0 0 "${menuList[@]}" --stdout) +[[ $? -ne 0 ]] && exit 0 +gameOption+=("${pk3}")