Added -l option to launch games without going through the menu.
This commit is contained in:
parent
858211865d
commit
bd2763ee54
@ -282,17 +282,26 @@ game_launcher() {
|
|||||||
echo "Install some games first."
|
echo "Install some games first."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
# Create the menu of installed games
|
if [[ $# -eq 0 ]]; then
|
||||||
declare -a menuList
|
# Create the menu of installed games
|
||||||
for i in "${lines[@]}" ; do
|
declare -a menuList
|
||||||
menuList+=("${i%|*}" "${i##*|}")
|
for i in "${lines[@]}" ; do
|
||||||
done
|
menuList+=("${i%|*}" "${i##*|}")
|
||||||
menuList+=("Make a One Time Donation" "Make a One Time Donation")
|
done
|
||||||
menuList+=("Become a Patron" "Become a Patron")
|
menuList+=("Make a One Time Donation" "Make a One Time Donation")
|
||||||
local game="$(dialog --backtitle "Audio Game Launcher" \
|
menuList+=("Become a Patron" "Become a Patron")
|
||||||
--clear \
|
local game="$(dialog --backtitle "Audio Game Launcher" \
|
||||||
--no-tags \
|
--clear \
|
||||||
--menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)"
|
--no-tags \
|
||||||
|
--menu "Please select a game to play" 0 0 0 "${menuList[@]}" --stdout)"
|
||||||
|
else
|
||||||
|
local game="$(grep "^${1}|" "${configFile}")"
|
||||||
|
game="${game%|*}"
|
||||||
|
if [[ -z "$game" ]]; then
|
||||||
|
echo "Game $1 not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [[ ${#game} -gt 0 ]]; then
|
if [[ ${#game} -gt 0 ]]; then
|
||||||
if [[ "$game" == "Make a One Time Donation" ]]; then
|
if [[ "$game" == "Make a One Time Donation" ]]; then
|
||||||
open_url "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=stormdragon2976@gmail.com&lc=US&item_name=Donation+to+Storm+Games&no_note=0&cn=¤cy_code=USD&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted"
|
open_url "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=stormdragon2976@gmail.com&lc=US&item_name=Donation+to+Storm+Games&no_note=0&cn=¤cy_code=USD&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted"
|
||||||
@ -455,7 +464,7 @@ declare -A command=(
|
|||||||
[c]="Check your system for necessary components."
|
[c]="Check your system for necessary components."
|
||||||
[h]="This help screen."
|
[h]="This help screen."
|
||||||
[i]="Install games."
|
[i]="Install games."
|
||||||
[m]="Manually handle install screens instead of using xdotools."
|
[l:]="launch given game without interactive audiogame-manager menu specified by its wine bottle."
|
||||||
[N]="No cache, delete the installer after it has been extracted."
|
[N]="No cache, delete the installer after it has been extracted."
|
||||||
[r]="Remove a game. This will delete all game data."
|
[r]="Remove a game. This will delete all game data."
|
||||||
)
|
)
|
||||||
@ -468,7 +477,7 @@ while getopts "${args}" i ; do
|
|||||||
c) checklist;;
|
c) checklist;;
|
||||||
h) help;;
|
h) help;;
|
||||||
i) game_installer;;
|
i) game_installer;;
|
||||||
m) manualInstall="true";;
|
l) game_launcher "${OPTARG}";;
|
||||||
N) noCache="true";;
|
N) noCache="true";;
|
||||||
r) game_removal;;
|
r) game_removal;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user