Alert function from audiogame-manager added. Used for when password may be needed to extract TobyMod to proper location.

This commit is contained in:
stormdragon2976 2023-05-16 19:09:23 -04:00
parent 6a48817da2
commit f1f82ecf03

View File

@ -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/"