From 72fd468a1512adbe7340b8844c287564577d0b52 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 31 Jul 2024 17:48:58 -0400 Subject: [PATCH] Updated all the custom game scripts. --- .scripts/TobyCustom/Brutal_Death_Match.sh | 15 +++++--- .../Project_Brutality_Toby_Deluxe.sh | 19 ++++++---- .../TobyCustom/Project_Brutality_Toby_Demo.sh | 19 ++++++---- .scripts/TobyCustom/StarWars.sh | 37 ------------------- 4 files changed, 31 insertions(+), 59 deletions(-) delete mode 100755 .scripts/TobyCustom/StarWars.sh diff --git a/.scripts/TobyCustom/Brutal_Death_Match.sh b/.scripts/TobyCustom/Brutal_Death_Match.sh index b2a5304..f414a9e 100755 --- a/.scripts/TobyCustom/Brutal_Death_Match.sh +++ b/.scripts/TobyCustom/Brutal_Death_Match.sh @@ -2,13 +2,16 @@ pushd "$doomPath" +gamePath=~/.local/games/doom + # Set up the pk3 and wad files gameOption=( - "${doomPath}/TobyAccMod_V${tobyVersion}.pk3" - "${doomPath}/PB-Toby-Compatibility-Addon.pk3" - "${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3" + "${gamePath}/TobyAccMod_V${tobyVersion}.pk3" + "${gamePath}/PB-Toby-Compatibility-Addon.pk3" + "${gamePath}/Toby-Universal-Pickup-Beacon-Prototype.pk3" "$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')" - "${doomPath}/TobyDeathArena_V1-0.wad" + "$(find ~/.local/games/doom -name 'Project_Brutality-master.pk3')" + "${gamePath}/TobyDeathArena_V1-0.wad" ) # Death match setup @@ -97,9 +100,9 @@ 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 diff --git a/.scripts/TobyCustom/Project_Brutality_Toby_Deluxe.sh b/.scripts/TobyCustom/Project_Brutality_Toby_Deluxe.sh index 9e8cbcd..5921b59 100755 --- a/.scripts/TobyCustom/Project_Brutality_Toby_Deluxe.sh +++ b/.scripts/TobyCustom/Project_Brutality_Toby_Deluxe.sh @@ -3,20 +3,23 @@ # Set the current path to the Doom path required by some OS. pushd "${doomPath}" +gamePath=~/.local/games/doom + # Set up the pk3 and wad files gameOption=( - "${doomPath}/TobyAccMod_V${tobyVersion}.pk3" - "${doomPath}/PB-Toby-Compatibility-Addon.pk3" - "${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3" - "${doomPath}/TobyDoomLevels.wad" + "${gamePath}/TobyAccMod_V${tobyVersion}.pk3" + "${gamePath}/PB-Toby-Compatibility-Addon.pk3" + "${gamePath}/Toby-Universal-Pickup-Beacon-Prototype.pk3" + "${gamePath}/TobyDoomLevels.wad" "$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')" + "$(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+=("${doomPath}/DoomMetalVol7.wad") -elif [[ -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 # Source common variable extensions. diff --git a/.scripts/TobyCustom/Project_Brutality_Toby_Demo.sh b/.scripts/TobyCustom/Project_Brutality_Toby_Demo.sh index 6db0516..2c0e645 100755 --- a/.scripts/TobyCustom/Project_Brutality_Toby_Demo.sh +++ b/.scripts/TobyCustom/Project_Brutality_Toby_Demo.sh @@ -3,20 +3,23 @@ # Set the current path to the Doom path required by some OS. pushd "${doomPath}" +gamePath=~/.local/games/doom + # Set up the pk3 and wad files gameOption=( - "${doomPath}/TobyAccMod_V${tobyVersion}.pk3" - "${doomPath}/PB-Toby-Compatibility-Addon.pk3" - "${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3" - "${doomPath}/Toby-Demo-Level.wad" + "${gamePath}/TobyAccMod_V${tobyVersion}.pk3" + "${gamePath}/PB-Toby-Compatibility-Addon.pk3" + "${gamePath}/Toby-Universal-Pickup-Beacon-Prototype.pk3" + "${gamePath}/Toby-Demo-Level.wad" "$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')" + "$(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+=("${doomPath}/DoomMetalVol7.wad") -elif [[ -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 # Source common variable extensions. diff --git a/.scripts/TobyCustom/StarWars.sh b/.scripts/TobyCustom/StarWars.sh deleted file mode 100755 index b097c3a..0000000 --- a/.scripts/TobyCustom/StarWars.sh +++ /dev/null @@ -1,37 +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' '^\([^?]*\)\(was\)\([^?]*\)$' - '-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