diff --git a/.scripts/TobyCustom/Brutal_Death_Match.sh b/.scripts/TobyCustom/Brutal_Death_Match.sh index ac578fb..67d806b 100755 --- a/.scripts/TobyCustom/Brutal_Death_Match.sh +++ b/.scripts/TobyCustom/Brutal_Death_Match.sh @@ -111,6 +111,8 @@ grepStrings+=('-e' 'New PDA Entry:' '-e' ' died.' '-e' ' has been ' '-e' 'Lesser demon energy' + '-e' ' was mutilated ' + '-e' ' was shot down ' '-e' 'Got the ' '-e' "You've found " '-e' 'Slot ') diff --git a/.scripts/TobyCustom/Project_Brutality_Operation_MDK.sh b/.scripts/TobyCustom/Project_Brutality_Operation_MDK.sh index 5838e20..c3ccb09 100755 --- a/.scripts/TobyCustom/Project_Brutality_Operation_MDK.sh +++ b/.scripts/TobyCustom/Project_Brutality_Operation_MDK.sh @@ -25,7 +25,7 @@ fi # Extend the search for new messages to be read. grepStrings+=('-e' 'New PDA Entry:' '-e' ' died.' - '-e' ' has been gunned down by ' + '-e' ' has been ' '-e' 'Lesser demon energy' '-e' 'Got the ' '-e' "You've found " diff --git a/.scripts/TobyCustom/Project_Brutality_Toby_Deluxe.sh b/.scripts/TobyCustom/Project_Brutality_Toby_Deluxe.sh index 071df49..a65b296 100755 --- a/.scripts/TobyCustom/Project_Brutality_Toby_Deluxe.sh +++ b/.scripts/TobyCustom/Project_Brutality_Toby_Deluxe.sh @@ -25,7 +25,7 @@ fi # Extend the search for new messages to be read. grepStrings+=('-e' 'New PDA Entry:' '-e' ' died.' - '-e' ' has been gunned down by ' + '-e' ' has been ' '-e' 'Lesser demon energy' '-e' 'Got the ' '-e' "You've found " diff --git a/.scripts/TobyCustom/Project_Brutality_Toby_Demo.sh b/.scripts/TobyCustom/Project_Brutality_Toby_Demo.sh index e5a359b..457a04f 100755 --- a/.scripts/TobyCustom/Project_Brutality_Toby_Demo.sh +++ b/.scripts/TobyCustom/Project_Brutality_Toby_Demo.sh @@ -25,7 +25,7 @@ fi # Extend the search for new messages to be read. grepStrings+=('-e' 'New PDA Entry:' '-e' ' died.' - '-e' ' has been gunned down by ' + '-e' ' has been ' '-e' 'Lesser demon energy' '-e' 'Got the ' '-e' "You've found " diff --git a/.scripts/TobyCustom/StarWars.sh b/.scripts/TobyCustom/StarWars.sh new file mode 100755 index 0000000..7899b3c --- /dev/null +++ b/.scripts/TobyCustom/StarWars.sh @@ -0,0 +1,36 @@ +#!/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