Added -t option to show number of games currently available.

This commit is contained in:
Storm Dragon 2022-03-27 03:14:04 -04:00
parent 9f6f6f7d91
commit bc5ac9f3d2

View File

@ -990,7 +990,7 @@ gameList=(
"Q9"
"Revelation"
"Rhythm Rage"
#"River raiders"
#"River Raiders"
"RS Games"
"Run For Your Life"
#"Sammy Center"
@ -1065,6 +1065,7 @@ declare -A command=(
[P]="Print a list of packages required by audiogame-manager."
[R]="Redownload. Removes old versions of packages from cache before installing."
[r]="Remove a game. This will delete all game data."
[t]="Total games. Show how many games are currently available."
)
# Convert the keys of the associative array to a format usable by getopts
@ -1092,6 +1093,11 @@ while getopts "${args}" i ; do
P) checklist quiet;;
R) redownload="true";;
r) game_removal;;
t)
dialog --backtitle "Linux Game Manager" \
--infobox "There are currently ${#gameList[@]} games available." -1 -1
exit 0
;;
esac
done
@ -2192,9 +2198,10 @@ EOF
# Choppy sound under water.
install_wine_bottle
download "https://www.agarchive.net/games/XSight/River%20Raiders%201.3.5.exe"
wine "$cache/River Raiders 1.3.5.exe" /silent &
wine "$cache/River Raiders 1.3.5.exe" &
xdotool sleep 5 type y 2> /dev/null
xdotool sleep 1 key --clearmodifiers alt+n sleep 2 key alt+n sleep 2 key alt+n sleep 2 key alt+i sleep 5 key alt+f 2> /dev/null
wineserver -w
add_launcher "c:\Program Files\River Raiders\raid.exe"
;;
"RS Games")