From f1f82ecf039457a248fe1032f90bf3017778de73 Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Tue, 16 May 2023 19:09:23 -0400 Subject: [PATCH] Alert function from audiogame-manager added. Used for when password may be needed to extract TobyMod to proper location. --- linux-game-manager.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/linux-game-manager.sh b/linux-game-manager.sh index 89ce89b..61fb742 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -159,6 +159,13 @@ desktop_launcher() { exit 0 } +# Alerts, for when user needs to read something. +alert() { + play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t + echo + read -rp "Press enter to continue." continue +} + clear_cache() { local answer if [[ ! -d "${cache}" ]]; then @@ -413,11 +420,10 @@ game_launcher() { -e '^Player was ' \ -e '^Please select a game wad \(or 0 to exit\):' \ -e '^You have no keys in your pocket!$' | stdbuf -oL sed \ - -e 's/MAP0\([1-9]\)/MAP\1/' \ -e 's/"cl_run" = "true"/run/' \ -e 's/"cl_run" = "false"/walk/' \ - -e 's:.*/:Game saved. (:' \ - | spd-say -e + -e 's/MAP0\([1-9]\)/Map \1/' \ + -e 's:.*/:Game saved. (:' | spd-say -e ;; *"main.py") pushd "${game%/*}" @@ -642,6 +648,9 @@ case "${game}" in fi doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)" download "https://www.dropbox.com/s/turlowrn2s3l191/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" mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom" cp "${doomPath}/gzdoom.ini" "${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/"