Log code was actually interfering with game abilities to launch or in some cases show documentation so it was removed. Added game "StickMUD".

This commit is contained in:
Storm Dragon 2022-03-27 02:17:24 -04:00
parent 6fc26121fe
commit 6cdf6f79e6

View File

@ -64,6 +64,24 @@ fi
exit $? exit $?
} }
# Function to open a terminal emulator
terminal_emulator() {
terminals=(
"lxterminal"
"mate-terminal"
"gnome-terminal"
)
for i in "${terminals[@]}" ; do
if command $i --working-directory="${game%/*}" -e $* ; then
return
fi
done
echo "No suitable terminal emulators found, please install one of:"
for i in "${terminals[@]}" ; do
echo "$i"
done
}
# Function to open urls # Function to open urls
open_url() { open_url() {
xdg-open "${*}" 2> /dev/null xdg-open "${*}" 2> /dev/null
@ -245,6 +263,8 @@ game_launcher() {
if [[ $menuCode -eq 1 ]]; then if [[ $menuCode -eq 1 ]]; then
exit 0 exit 0
fi fi
# Remove any trailing | from game variable.
game="${game%|}"
case "${game}" in case "${game}" in
"Aliens") "Aliens")
open_url "https://files.jantrid.net/aliens/" open_url "https://files.jantrid.net/aliens/"
@ -261,9 +281,17 @@ game_launcher() {
"Donate") "Donate")
open_url "https://ko-fi.com/stormux" open_url "https://ko-fi.com/stormux"
;; ;;
*".tin")
pushd "${game%/*}"
if [[ -n "${COLORTERM}" ]]; then
terminal_emulator tt++ ${game##*/}
else
exec tt++ ${game##*/}
fi
;;
*) *)
pushd "${game%/*}" pushd "${game%/*}"
exec ${game%|} exec ${game}
;; ;;
esac esac
exit 0 exit 0
@ -286,10 +314,6 @@ if [[ -r "${configFile%/*}/settings.conf" ]]; then
fi fi
unset noCache unset noCache
# Set up logging
echo -e "\n\n-----> Logging started at $(date '+%A, %B %d, %Y at %I:%M%p')\n" >> "${cache}/linux-game-manager.log"
exec &> >(/usr/bin/tee -a "${cache}/linux-game-manager.log")
# The list of games available for installation. # The list of games available for installation.
# Use menu friendly names. # Use menu friendly names.
gameList=( gameList=(
@ -304,10 +328,11 @@ gameList=(
"Monkey Spank" "Monkey Spank"
"Numnastics" "Numnastics"
"Onslaught" "Onslaught"
"QuentinC Play Room"
"S.E.A." "S.E.A."
"soundStrider" "soundStrider"
"StickMUD"
"System Fault" "System Fault"
"QuentinC Play Room"
"Trigaea" "Trigaea"
"Wurmus" "Wurmus"
) )
@ -434,6 +459,11 @@ case "${game}" in
unzip -d "${installPath}/soundStrider" "${cache}/soundStrider-linux-x64.zip" unzip -d "${installPath}/soundStrider" "${cache}/soundStrider-linux-x64.zip"
add_launcher "${installPath}/soundStrider/soundStrider" add_launcher "${installPath}/soundStrider/soundStrider"
;; ;;
"StickMUD")
git -C "${installPath}/" clone --recurse-submodules https://github.com/stormdragon2976/tintin-stickmud.git | \
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
add_launcher "${installPath}/tintin-stickmud/stickmud.tin"
;;
"System Fault") "System Fault")
get_installer "system-fault-linux-x86_64.AppImage" "https://lightsoutgames.itch.io/systemfault" get_installer "system-fault-linux-x86_64.AppImage" "https://lightsoutgames.itch.io/systemfault"
mkdir -p "${installPath}/System_Fault" mkdir -p "${installPath}/System_Fault"