Compare commits
22 Commits
a38eee08cb
...
testing
Author | SHA1 | Date | |
---|---|---|---|
91d1e29092 | |||
02b8a3e5a2 | |||
4509448c61 | |||
771fe5d956 | |||
4a0e6c83b8 | |||
69631769f8 | |||
06c3d87db0 | |||
c556aa73ee | |||
6a0fa006d9 | |||
27fac7e007 | |||
b489bb9a46 | |||
a33c4a3c23 | |||
a624691b0d | |||
c70c50255f | |||
0ac6d6fd57 | |||
ced1af728e | |||
c5c5996c23 | |||
f8e5b7ca75 | |||
e0e240848d | |||
9fbc149e19 | |||
8448d57710 | |||
99067d9e75 |
@ -1,3 +1,5 @@
|
||||
game="${0##*/}"
|
||||
game="${game%.sh}"
|
||||
check_dependencies git sox tt++
|
||||
git -C "${installPath}/" clone --recurse-submodules https://github.com/lilmike/tintin-alteraeon.git | \
|
||||
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
|
||||
|
@ -1,3 +1,5 @@
|
||||
game="${0##*/}"
|
||||
game="${game%.sh}"
|
||||
check_dependencies git sox tt++
|
||||
git -C "${installPath}/" clone --recurse-submodules https://github.com/lilmike/tintin-empiremud.git | \
|
||||
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
|
||||
|
@ -1,3 +1,5 @@
|
||||
game="${0##*/}"
|
||||
game="${game%.sh}"
|
||||
check_dependencies git opusdec sox tt++
|
||||
git -C "${installPath}/" clone https://git.2mb.codes/~stormdragon2976/tintin-endoftime | \
|
||||
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
|
||||
|
5
.install/Legends of Kallisti.sh
Normal file
5
.install/Legends of Kallisti.sh
Normal file
@ -0,0 +1,5 @@
|
||||
game="${0##*/}"
|
||||
game="${game%.sh}"
|
||||
check_dependencies git sox tt++
|
||||
git -C "${installPath}/" clone --recurse-submodules https://github.com:hjozwiak/tintin-kallisti-pack | \
|
||||
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
|
@ -1,24 +1,39 @@
|
||||
check_architecture x86_64
|
||||
echo "Please note this requires the game to be available either in your Steam library"
|
||||
echo "or as the installer purchased from gog.com."
|
||||
echo "If using the gog.com installer, please use the default path when prompted."
|
||||
alert
|
||||
check_dependencies steamcmd
|
||||
alert
|
||||
dialog --backtitle "Linux Game manager" \
|
||||
--msgbox \
|
||||
"Please note this requires the game to be available either in your Steam library\nor as the installer purchased from gog.com.\nIf using the gog.com installer, please use the default path when prompted." -1 -1 --stdout
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--yes-label "GOG" \
|
||||
--no-label "Steam" \
|
||||
--yesno "Select installation method" -1 -1 --stdout
|
||||
installationMethod=$?
|
||||
appId="646570"
|
||||
if ! [[ -f ~/Downloads/slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh ]] && ! [[ -f ~/Desktop/slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh ]]; then
|
||||
gogFileName="slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh"
|
||||
if [[ $installMethod -eq 1 ]]; then
|
||||
# Steam Installation
|
||||
echo "Please enter Steam user name:"
|
||||
read -er steamUser
|
||||
steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire" +login "$steamUser" +app_update "$appId" +quit
|
||||
if [[ $? -ne 0 ]]; then
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error installing game through Steam." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
DISPLAY=""
|
||||
find ~/Downloads -maxdepth 1 -type f -name 'slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \; ||
|
||||
find ~/Desktop -maxdepth 1 -type f -name 'slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh' -exec bash "{}" \;
|
||||
# GOG Installation
|
||||
get_installer "$gogFileName" "https://www.gog.com/en/game/slay_the_spire"
|
||||
DISPLAY="" find ~/Downloads -maxdepth 1 -type f -name "$gogFileName" -exec bash "{}" \; ||
|
||||
DISPLAY="" find ~/Desktop -maxdepth 1 -type f -name "$gogFileName" -exec bash "{}" \;
|
||||
if [[ $? -eq 0 ]]; then
|
||||
ln -sf "${HOME}/GOG Games/Slay the Spire/game" "${installPath}/SlayTheSpire" ||
|
||||
{ echo "Error creating link."
|
||||
{ dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error creating link to game directory." -1 -1 --stdout
|
||||
exit 1; }
|
||||
else
|
||||
echo "Error installing game."
|
||||
else
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error installing game from GOG installer." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@ -33,7 +48,7 @@ else
|
||||
fi
|
||||
cp -v .files/SlayTheSpire/MTS.sh "${HOME}/.local/games/SlayTheSpire/"
|
||||
# Get mods
|
||||
declare -A mods=(
|
||||
declare -A modsMap=(
|
||||
[mod the spire]=1605060445
|
||||
[base mod]=1605833019
|
||||
[stslib]=1609158507
|
||||
@ -42,17 +57,25 @@ declare -A mods=(
|
||||
[say the spire]=2239220106
|
||||
)
|
||||
installString=""
|
||||
for x in ${mods[@]} ; do
|
||||
installString="$installString +workshop_download_item $appId $x"
|
||||
for modId in ${modsMap[@]} ; do
|
||||
installString="$installString +workshop_download_item $appId $modId"
|
||||
done
|
||||
steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire/" +login anonymous $installString +quit
|
||||
if [[ $? -ne 0 ]]; then
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error installing required mods. Some accessibility features may not be available." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p "$HOME/.local/games/SlayTheSpire/mods"
|
||||
for x in "${!mods[@]}" ; do
|
||||
if [ "$x" == "mod the spire" ] ; then
|
||||
ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${mods[$x]}"/* "$HOME/.local/games/SlayTheSpire/"
|
||||
for modName in "${!modsMap[@]}" ; do
|
||||
if [[ "$modName" == "mod the spire" ]]; then
|
||||
ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${modsMap[$modName]}"/* "$HOME/.local/games/SlayTheSpire/"
|
||||
else
|
||||
ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${mods[$x]}"/* "$HOME/.local/games/SlayTheSpire/mods/"
|
||||
ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${modsMap[$modName]}"/* "$HOME/.local/games/SlayTheSpire/mods/"
|
||||
fi
|
||||
if [[ $? -ne 0 ]] && [[ "$modName" == "say the spire" ]]; then
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Error installing SayTheSpire mod. Screen reader support will not be available." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
launcherPath="$(readlink -f "$0")"
|
||||
launcherPath="${launcherPath%/*}"
|
||||
|
@ -1,3 +1,5 @@
|
||||
game="${0##*/}"
|
||||
game="${game%.sh}"
|
||||
check_dependencies git sox tt++
|
||||
git -C "${installPath}/" clone --recurse-submodules https://github.com/stormdragon2976/tintin-stickmud.git | \
|
||||
dialog --progressbox "Installing \"${game}\", please wait..." -1 -1
|
||||
|
@ -1,6 +1,6 @@
|
||||
check_architecture x86_64
|
||||
get_installer "Ttc v3.0 linux.zip" "https://renzivan.itch.io/the-tornado-chicken"
|
||||
unzip -d "${installPath}/The Tornado Chicken" "${cache}/Ttc v3.0 linux.zip"
|
||||
get_installer "Ttc v3.2 linux.zip" "https://renzivan.itch.io/the-tornado-chicken"
|
||||
unzip -d "${installPath}/The Tornado Chicken" "${cache}/Ttc v3.2 linux.zip"
|
||||
chmod +x "${installPath}/The Tornado Chicken/Ttc"
|
||||
echo "Note: When the game first starts it will be playing very loud music with the built in suboptimal voice."
|
||||
echo "You are recommended to press page down several times to turn down the music, then go to settings and enable speech with screen reader, using speech dispatcher."
|
||||
|
@ -3,7 +3,7 @@ pushd "${mudPath%/*}"
|
||||
git pull | \
|
||||
dialog --progressbox "Checking for updates, please wait..." -1 -1
|
||||
if [[ -n "${COLORTERM}" ]]; then
|
||||
terminal_emulator tt++ ${mudPath##*/}
|
||||
terminal_emulator "${mudPath%/*}" "tt++" "${mudPath##*/}"
|
||||
else
|
||||
tt++ ${mudPath##*/}
|
||||
tt++ ${mudPath##*/}
|
||||
fi
|
||||
|
@ -3,7 +3,7 @@ pushd "${mudPath%/*}"
|
||||
git pull | \
|
||||
dialog --progressbox "Checking for updates, please wait..." -1 -1
|
||||
if [[ -n "${COLORTERM}" ]]; then
|
||||
terminal_emulator tt++ ${mudPath##*/}
|
||||
terminal_emulator "${mudPath%/*}" "tt++" "${mudPath##*/}"
|
||||
else
|
||||
tt++ ${mudPath##*/}
|
||||
tt++ ${mudPath##*/}
|
||||
fi
|
||||
|
@ -3,7 +3,7 @@ pushd "${mudPath%/*}"
|
||||
git pull | \
|
||||
dialog --progressbox "Checking for updates, please wait..." -1 -1
|
||||
if [[ -n "${COLORTERM}" ]]; then
|
||||
terminal_emulator tt++ ${mudPath##*/}
|
||||
terminal_emulator "${mudPath%/*}" "tt++" "${mudPath##*/}"
|
||||
else
|
||||
tt++ ${mudPath##*/}
|
||||
tt++ "${mudPath%/*}" "${mudPath##*/}"
|
||||
fi
|
||||
|
@ -1,354 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
launch_game() {
|
||||
pushd "${gamePath}"
|
||||
#echo "exec stdbuf -oL ${gzdoom} ${@} | speak"
|
||||
exec stdbuf -oL ${gzdoom} ${@} | speak
|
||||
popd
|
||||
}
|
||||
|
||||
speak() {
|
||||
if pgrep cthulhu ; then
|
||||
speechProvider="socat - UNIX-CLIENT:/tmp/cthulhu.sock"
|
||||
else
|
||||
speechProvider="spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} --"
|
||||
fi
|
||||
startSpeech=1
|
||||
while IFS= read -r line; do
|
||||
echo "$line"
|
||||
if [[ $startSpeech -eq 1 ]] && [[ "$line" =~ ^-{5,}$ ]]; then
|
||||
startSpeech=0
|
||||
continue
|
||||
fi
|
||||
if [[ $startSpeech -eq 0 ]]; then
|
||||
line=$(echo "${line}" |
|
||||
grep "${antiGrepStrings[@]}" |
|
||||
sed "${sedStrings[@]}")
|
||||
if [[ "$doomLanguage" != "en" ]]; then
|
||||
line=$(translate_text "$line")
|
||||
fi
|
||||
echo "${line}" | $speechProvider
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Dialog setup:
|
||||
DIALOG_ITEM_HELP=""
|
||||
export DIALOGOPTS='--no-lines --visit-items'
|
||||
|
||||
|
||||
# Toby games path
|
||||
export gamePath=~/.local/games/doom
|
||||
# Path where doom wads are stored
|
||||
export doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)"
|
||||
|
||||
# Path to gzdoom or yadoom.
|
||||
if [[ -x "${BASH_SOURCE[0]%/*}/yadoom" ]]; then
|
||||
export gzdoom="$(readlink -f "${BASH_SOURCE[0]%/*}/yadoom")"
|
||||
gamePath=~/.local/games/doom
|
||||
check_dependencies python-pyside6:PySide6 python-setproctitle:setproctitle
|
||||
pushd "${gamePath}"
|
||||
if ! [[ -d "toby-doom-launcher" ]]; then
|
||||
git clone https://git.stormux.org/storm/toby-doom-launcher.git
|
||||
else
|
||||
export gzdoom="$(command -v gzdoom)"
|
||||
git -C "${gamePath}/toby-doom-launcher" pull
|
||||
fi
|
||||
|
||||
# Version of the accessibility mod
|
||||
export tobyVersion="8-0"
|
||||
|
||||
|
||||
# Doom Addons
|
||||
mapfile -t doomAddons < <(find "$gamePath/Addons/DOOM/" -type f -name "Toby*.pk3"
|
||||
find "$gamePath/Addons/MENU/" -type f -name "Toby*.pk3"
|
||||
)
|
||||
# Heretic Addons
|
||||
mapfile -t hereticAddons < <(find "$gamePath/Addons/HERETIC/" -type f -name "TobyHeretic*.pk3"
|
||||
find "$gamePath/Addons/MENU/" -type f -name "Toby*.pk3"
|
||||
)
|
||||
# Hexen Addons
|
||||
mapfile -t hexenAddons < <(find "$gamePath/Addons/HEXEN/" -type f -name "TobyHexen*.pk3"
|
||||
find "$gamePath/Addons/MENU/" -type f -name "Toby*.pk3"
|
||||
)
|
||||
|
||||
doomGames=(
|
||||
# Toby demo map
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/Toby-Demo-Level.wad ${doomAddons[*]}" "Freedoom Toby Demo Map"
|
||||
# Unmodified Doom with accessibility.
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${doomAddons[*]}" "Freedoom"
|
||||
# Toby accessibility mods
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyDoomLevels.wad ${doomAddons[*]}" "Freedoom Toby Delux Map Pack"
|
||||
# OperationMDK
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/OpMDK.wad ${doomAddons[*]}" "Freedoom OperationMDK"
|
||||
# Unmodified Heretic with accessibility
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${hereticAddons[*]}" "Classic Heretic"
|
||||
# Heretic accessibility mods
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyHereticLevels.wad ${hereticAddons[*]}" "Toby Heretic"
|
||||
# Unmodified Hexen with accessibility
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${hexenAddons[*]}" "Classic Hexen"
|
||||
# Heretic accessibility mods
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyHexen.pk3 ${hexenAddons[*]}" "Toby Hexen"
|
||||
"custom_game" "Custom Game"
|
||||
)
|
||||
|
||||
export antiGrepStrings=(
|
||||
'-E' '-v'
|
||||
'-e' '^----+$'
|
||||
'-e' '^$'
|
||||
'-e' '^[0-9]'
|
||||
'-e' '^P_StartScript:'
|
||||
'-e' '^(Facing |fluidsynth |INTRO|MAP[0-9]+|Music "|Unknown)'
|
||||
'-e' '^(\[Toby Accessibility Mod\] )?READ.*'
|
||||
'-e' '^ *TITLEMAP'
|
||||
'-e' '^\[Toby Accessibility Mod\] (INTRO|READMe)([0-9]+).*'
|
||||
'-e' 'key card'
|
||||
'-e' '^New PDA Entry:'
|
||||
'-e' "^(As |Computer Voice:|Holy|I |I've|Monorail|Sector |Ugh|What|Where)"
|
||||
'-e' 'Script warning, "'
|
||||
'-e' 'Tried to define'
|
||||
)
|
||||
|
||||
export sedStrings=('-E'
|
||||
'-e' 's/^\[Toby Accessibility Mod\] M_/[Toby Accessibility Mod] /'
|
||||
'-e' 's/^\[Toby Accessibility Mod\] //'
|
||||
'-e' 's/^MessageBoxMenu$/Confirmation menu: Press Y for yes or N for no/'
|
||||
'-e' 's/^Mainmenu$/Main menu/'
|
||||
'-e' 's/^Skillmenu$/Difficulty menu/'
|
||||
'-e' 's/^NGAME$/New game/'
|
||||
'-e' 's/^(LOAD|SAVE|QUIT)G$/\1 game/'
|
||||
'-e' 's/"cl_run" = "true"/run/'
|
||||
'-e' 's/"cl_run" = "false"/walk/'
|
||||
#'-e' 's:.*/:Game saved. \(:'
|
||||
'-e' 's/UAC/U A C/'
|
||||
'-e' 's/^\+//'
|
||||
'-e' 's/ ?\*+ ?//g'
|
||||
)
|
||||
|
||||
# Translation stuff
|
||||
doomLanguage="${doomLanguage:-en}"
|
||||
cache="${cache:-${XDG_CACHE_HOME:-$HOME/.cache}/linux-game-manager}"
|
||||
translationDB="${cache}/doom_${doomLanguage}.sqlite"
|
||||
|
||||
# Function to initialize SQLite database
|
||||
init_translation_db() {
|
||||
mkdir -p "$cache"
|
||||
if [[ ! -f "$translationDB" ]]; then
|
||||
sqlite3 "$translationDB" <<EOF
|
||||
CREATE TABLE translations (
|
||||
original TEXT PRIMARY KEY,
|
||||
translated TEXT
|
||||
);
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to translate text
|
||||
translate_text() {
|
||||
local text="$1"
|
||||
local translatedText
|
||||
# Check if translation exists in database
|
||||
translatedText=$(sqlite3 "$translationDB" "SELECT translated FROM translations WHERE original = ?;" "$text")
|
||||
if [[ -n "$translatedText" ]]; then
|
||||
echo "$translatedText"
|
||||
return 0
|
||||
fi
|
||||
translatedText=$(trans -b -t "$doomLanguage" "$text")
|
||||
# Store new translation in database
|
||||
sqlite3 "$translationDB" "INSERT INTO translations (original, translated) VALUES (?, ?);" "$text" "$translatedText"
|
||||
echo "$translatedText"
|
||||
}
|
||||
|
||||
|
||||
custom_game() {
|
||||
mapfile -t customGames < <(find "${BASH_SOURCE[0]%/*}/TobyCustom/" -type f -iname '*.sh')
|
||||
declare -a customMenu
|
||||
for i in "${customGames[@]}" ; do
|
||||
customMenu+=("$i")
|
||||
title="${i##*/}"
|
||||
title="${title//_/ }"
|
||||
title="${title%.*}"
|
||||
customMenu+=("$title")
|
||||
done
|
||||
customGame="$(dialog --backtitle "Select your Custom Doom!" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--menu "Please select one" 0 0 0 "${customMenu[@]}" --stdout)"
|
||||
buttonCode=$?
|
||||
if [[ $buttonCode -eq 1 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
source "${customGame}"
|
||||
}
|
||||
|
||||
|
||||
if [[ "$doomLanguage" != "en" ]]; then
|
||||
init_translation_db
|
||||
fi
|
||||
|
||||
gameOption="$(dialog --backtitle "Select your Doom!" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--ok-label "Single Player" \
|
||||
--cancel-label "Death Match" \
|
||||
--extra-button \
|
||||
--extra-label "co-op" \
|
||||
--help-button \
|
||||
--help-label "Exit" \
|
||||
--menu "Please select one" 0 0 0 "${doomGames[@]}" --stdout)"
|
||||
buttonCode=$?
|
||||
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
|
||||
gameOption+=" DoomMetalVol7.wad"
|
||||
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
|
||||
gameOption+=" DoomMetalVol6.wad"
|
||||
fi
|
||||
|
||||
case ${buttonCode} in
|
||||
1)
|
||||
# Death match setup
|
||||
# Ignore the choice of map made above
|
||||
gameOption="${gamePath}/TobyAccMod_V${tobyVersion}.pk3 ${gamePath}/Addons/MAPS/TobyDeathArena_V1-5.wad ""$gamePath/Addons/DOOM/TobyV*_"*
|
||||
ipAddress="$(dialog --backtitle "Deathmatch Options" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--ok-label "Join" \
|
||||
--cancel-label "Exit" \
|
||||
--extra-button \
|
||||
--extra-label "Host" \
|
||||
--inputbox "Enter ip or URL, required for join." -1 -1 --stdout)"
|
||||
buttonCode=$?
|
||||
[[ $buttonCode -eq 1 ]] && exit 0
|
||||
if [[ $buttonCode -eq 0 ]]; then
|
||||
if [[ "${#ipAddress}" -lt 3 ]]; then
|
||||
dialog --backtitle "Deathmatch" --clear --msgbox "No ip address or URL given." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
flags=('-join' "${ipAddress}")
|
||||
else
|
||||
# List of maps included:
|
||||
maps=(
|
||||
"1" "Com Station (2-4 players)"
|
||||
"2" "Warehouse (2-4 players)"
|
||||
"3" "Sector 3 (2-4 players)"
|
||||
"4" "Dungeon of Doom (2-4 players)"
|
||||
"5" "Ocean Fortress (2-4 players)"
|
||||
"6" "Water Treatment Facility (2-4 players)"
|
||||
"7" "Phobos Base Site 4 (2-4 players)"
|
||||
"8" "Hangar Bay 18 (2-4 players)"
|
||||
"9" "Garden of Demon (2-4 players)"
|
||||
"10" "Outpost 69 (2-4 players)")
|
||||
# Array of how many players a given map supports in dialog rangebox syntax
|
||||
declare -a mapPlayers=(
|
||||
[1]="2 4"
|
||||
[2]="2 4"
|
||||
[3]="2 4"
|
||||
[4]="2 4"
|
||||
[5]="2 4"
|
||||
[6]="2 4"
|
||||
[7]="2 4"
|
||||
[8]="2 4"
|
||||
[9]="2 4"
|
||||
[10]="2 4")
|
||||
map="$(dialog --backtitle "Select Map" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--cancel-label "Exit" \
|
||||
--ok-label "Next" \
|
||||
--menu "Please select one" 0 0 0 "${maps[@]}" --stdout)"
|
||||
fraglimit="$(dialog --backtitle "Fraglimit" \
|
||||
--clear \
|
||||
--ok-label "Next" \
|
||||
--cancel-label "Exit" \
|
||||
--rangebox "Select Fraglimit" -1 -1 1 500 20 --stdout)"
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
# Get ip address
|
||||
yourIpAddress="$(curl -4s https://icanhazip.com)"
|
||||
players="$(dialog --backtitle "Host Deathmatch Game" \
|
||||
--clear \
|
||||
--ok-label "Next" \
|
||||
--cancel-label "Exit" \
|
||||
--rangebox "Select number of players. Remember to give them your IP address: ${yourIpAddress}" -1 -1 ${mapPlayers[$map]} --stdout)"
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
skillLevel="$(dialog --backtitle "Host Deathmatch Game" \
|
||||
--clear \
|
||||
--ok-label "Start" \
|
||||
--cancel-label "Exit" \
|
||||
--extra-button \
|
||||
--extra-label "Bots Only" \
|
||||
--rangebox "Select difficulty. 1 easiest, 5 hardest." -1 -1 1 5 3 --stdout)"
|
||||
code=$?
|
||||
[[ $code -eq 1 ]] && exit 0
|
||||
if [[ $code -eq 3 ]]; then
|
||||
players=1
|
||||
dialog --backtitle "Preparing to Launch" \
|
||||
--msgbox "When the game starts, press \` to open the console. Type addbot, press enter. Repeat addbot for as many bots as you would like. Press \` again to close the console." -1 -1 --stdout
|
||||
fi
|
||||
flags=(
|
||||
'-host' "${players}"
|
||||
'-skill' "${skillLevel}"
|
||||
'-deathmatch'
|
||||
'+set' 'sv_cheats' '1'
|
||||
'+fraglimit' "$fraglimit"
|
||||
'+dmflags' '16384' '+dmflags' '4' '+dmflags' '128' '+dmflags' '4096'
|
||||
'+dmflags2' '512' '+dmflags2' '1024'
|
||||
'-extratic' '-dup' '3'
|
||||
'-warp' "$map"
|
||||
)
|
||||
fi
|
||||
launch_game ${gameOption} "${flags[@]}"
|
||||
;;
|
||||
2)
|
||||
# Exit was pressed, so exit.
|
||||
exit 0
|
||||
;;
|
||||
3)
|
||||
# Co-op setup
|
||||
ipAddress="$(dialog --backtitle "Co-op Options" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--ok-label "Join" \
|
||||
--cancel-label "Exit" \
|
||||
--extra-button \
|
||||
--extra-label "Host" \
|
||||
--inputbox "Enter ip or URL, required for join." -1 -1 --stdout)"
|
||||
buttonCode=$?
|
||||
[[ $buttonCode -eq 1 ]] && exit 0
|
||||
if [[ $buttonCode -eq 0 ]]; then
|
||||
if [[ "${#ipAddress}" -lt 3 ]]; then
|
||||
dialog --backtitle "Co-op" --clear --msgbox "No ip address or URL given." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
flags=("keyshare-universal.pk3" '-join' "${ipAddress}")
|
||||
else
|
||||
# Get ip address
|
||||
yourIpAddress="$(curl -4s https://icanhazip.com)"
|
||||
players="$(dialog --backtitle "Host Co-op Game" \
|
||||
--clear \
|
||||
--ok-label "Next" \
|
||||
--cancel-label "Exit" \
|
||||
--rangebox "Select number of players. Remember to give them your IP address: ${yourIpAddress}" -1 -1 2 10 --stdout)"
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
skillLevel="$(dialog --backtitle "Host Co-op Game" \
|
||||
--clear \
|
||||
--ok-label "Start" \
|
||||
--cancel-label "Exit" \
|
||||
--rangebox "Select difficulty. 1 easiest, 5 hardest." -1 -1 1 5 3 --stdout)"
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
flags=(
|
||||
"keyshare-universal.pk3"
|
||||
'-host' "${players}"
|
||||
'-skill' "${skillLevel}"
|
||||
'+set' 'sv_cheats' '1'
|
||||
'+set' 'sv_weaponsstay' '1'
|
||||
'+set' 'sv_respawnprotect' '1'
|
||||
'+set' 'sv_respawnsuper' '1'
|
||||
'+set' 'alwaysapplydmflags' ''1
|
||||
'-extratic' '-dup' '3'
|
||||
)
|
||||
fi
|
||||
pushd "${gamePath}"
|
||||
launch_game ${gameOption} "${flags[@]}"
|
||||
;;
|
||||
0)
|
||||
if [[ "${gameOption%% *}" == "custom_game" ]]; then
|
||||
custom_game
|
||||
fi
|
||||
launch_game ${gameOption[@]} "${flags[@]}"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
"toby-doom-launcher/Toby Doom Launcher.py"
|
||||
|
9
.launch/Legends of Kallisti.game
Normal file
9
.launch/Legends of Kallisti.game
Normal file
@ -0,0 +1,9 @@
|
||||
mudPath="${installPath}/tintin-kallisti-pack/kallisti.tin"
|
||||
pushd "${mudPath%/*}"
|
||||
git pull | \
|
||||
dialog --progressbox "Checking for updates, please wait..." -1 -1
|
||||
if [[ -n "${COLORTERM}" ]]; then
|
||||
terminal_emulator "${mudPath%/*}" "tt++" "${mudPath##*/}"
|
||||
else
|
||||
tt++ ${mudPath##*/}
|
||||
fi
|
35
.launch/Slay the Spire.game
Normal file → Executable file
35
.launch/Slay the Spire.game
Normal file → Executable file
@ -1,2 +1,33 @@
|
||||
pushd "${installPath}"
|
||||
"${launcherPath}/.scripts/SlayTheSpire.sh"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
menulist() {
|
||||
# Args: menu options.
|
||||
# returns: selected tag
|
||||
local i
|
||||
local menuList
|
||||
for i in $@ ; do
|
||||
menuList+=("$i" "$i")
|
||||
done
|
||||
dialog --backtitle "Select a Slay the Spire profile." \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--menu "$(gettext "Please select one")" 0 0 0 "${menuList[@]}" --stdout
|
||||
if [[ $? -ne 1 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Create a list of profiles
|
||||
profiles=($(jq -r '.lists | keys[]' "${HOME}/.config/ModTheSpire/mod_lists.json"))
|
||||
|
||||
if [[ "${#profiles[@]}" -ne 1 ]]; then
|
||||
currentProfile="$(menulist "${profiles[@]}")"
|
||||
else
|
||||
currentProfile="Default"
|
||||
fi
|
||||
|
||||
pushd "${HOME}/.local/games/SlayTheSpire"
|
||||
./MTS.sh --profile "$currentProfile"
|
||||
popd
|
||||
|
||||
exit 0
|
||||
|
@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
menulist() {
|
||||
# Args: menu options.
|
||||
# returns: selected tag
|
||||
local i
|
||||
local menuList
|
||||
for i in $@ ; do
|
||||
menuList+=("$i" "$i")
|
||||
done
|
||||
dialog --backtitle "Select a Slay the Spire profile." \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--menu "$(gettext "Please select one")" 0 0 0 "${menuList[@]}" --stdout
|
||||
if [[ $? -ne 1 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Create a list of profiles
|
||||
profiles=($(jq -r '.lists | keys[]' "${HOME}/.config/ModTheSpire/mod_lists.json"))
|
||||
|
||||
if [[ "${#profiles[@]}" -ne 1 ]]; then
|
||||
currentProfile="$(menulist "${profiles[@]}")"
|
||||
else
|
||||
currentProfile="Default"
|
||||
fi
|
||||
|
||||
pushd "${HOME}/.local/games/SlayTheSpire"
|
||||
./MTS.sh --profile "$currentProfile"
|
||||
popd
|
||||
|
||||
exit 0
|
@ -4,7 +4,7 @@ pushd "${mudPath%/*}"
|
||||
git pull | \
|
||||
dialog --progressbox "Checking for updates, please wait..." -1 -1
|
||||
if [[ -n "${COLORTERM}" ]]; then
|
||||
terminal_emulator tt++ ${mudPath##*/}
|
||||
terminal_emulator "${mudPath%/*}" "tt++" "${mudPath##*/}"
|
||||
else
|
||||
tt++ ${mudPath##*/}
|
||||
tt++ ${mudPath##*/}
|
||||
fi
|
||||
|
@ -1,124 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pushd "$doomPath"
|
||||
|
||||
# Set up the pk3 and wad files
|
||||
gameOption=(
|
||||
"$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
|
||||
"${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
|
||||
"${doomPath}/PB-Toby-Compatibility-Addon.pk3"
|
||||
"${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3"
|
||||
"${doomPath}/TobyDeathArena_V1-0.wad"
|
||||
)
|
||||
|
||||
# Death match setup
|
||||
ipAddress="$(dialog --backtitle "Deathmatch Options" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--ok-label "Join" \
|
||||
--cancel-label "Exit" \
|
||||
--extra-button \
|
||||
--extra-label "Host" \
|
||||
--inputbox "Enter ip or URL, required for join." -1 -1 --stdout)"
|
||||
buttonCode=$?
|
||||
[[ $buttonCode -eq 1 ]] && exit 0
|
||||
if [[ $buttonCode -eq 0 ]]; then
|
||||
if [[ "${#ipAddress}" -lt 3 ]]; then
|
||||
dialog --backtitle "Deathmatch" --clear --msgbox "No ip address or URL given." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
flags=('-join' "${ipAddress}")
|
||||
else
|
||||
# List of maps included:
|
||||
maps=(
|
||||
"1" "Com Station (2-4 players)"
|
||||
"2" "Warehouse (2-4 players)"
|
||||
"3" "Sector 3 (2-4 players)"
|
||||
"4" "Dungeon of Doom (2-4 players)"
|
||||
"5" "Ocean Fortress (2-4 players)"
|
||||
"6" "Water Treatment Facility (2-4 players)"
|
||||
"7" "Phobos Base Site 4 (2-4 players)"
|
||||
"8" "Hangar Bay 18 (2-4 players)")
|
||||
# Array of how many players a given map supports in dialog rangebox syntax
|
||||
declare -a mapPlayers=(
|
||||
[1]="2 4"
|
||||
[2]="2 4"
|
||||
[3]="2 4"
|
||||
[4]="2 4"
|
||||
[5]="2 4"
|
||||
[6]="2 4"
|
||||
[7]="2 4"
|
||||
[8]="2 4")
|
||||
map="$(dialog --backtitle "Select Map" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--cancel-label "Exit" \
|
||||
--ok-label "Next" \
|
||||
--menu "Please select one" 0 0 0 "${maps[@]}" --stdout)"
|
||||
fraglimit="$(dialog --backtitle "Fraglimit" \
|
||||
--clear \
|
||||
--ok-label "Next" \
|
||||
--cancel-label "Exit" \
|
||||
--rangebox "Select Fraglimit" -1 -1 1 500 20 --stdout)"
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
# Get ip address
|
||||
yourIpAddress="$(curl -4s https://icanhazip.com)"
|
||||
players="$(dialog --backtitle "Host Deathmatch Game" \
|
||||
--clear \
|
||||
--ok-label "Next" \
|
||||
--cancel-label "Exit" \
|
||||
--rangebox "Select number of players. Remember to give them your IP address: ${yourIpAddress}" -1 -1 ${mapPlayers[$map]} --stdout)"
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
skillLevel="$(dialog --backtitle "Host Deathmatch Game" \
|
||||
--clear \
|
||||
--ok-label "Start" \
|
||||
--cancel-label "Exit" \
|
||||
--extra-button \
|
||||
--extra-label "Bots Only" \
|
||||
--rangebox "Select difficulty. 1 easiest, 5 hardest." -1 -1 1 5 3 --stdout)"
|
||||
code=$?
|
||||
[[ $code -eq 1 ]] && exit 0
|
||||
if [[ $code -eq 3 ]]; then
|
||||
players=1
|
||||
dialog --backtitle "Preparing to Launch" \
|
||||
--msgbox "When the game starts, press \` to open the console. Type addbot, press enter. Repeat addbot for as many bots as you would like. Press \` again to close the console." -1 -1 --stdout
|
||||
fi
|
||||
flags=(
|
||||
'-host' "${players}"
|
||||
'-skill' "${skillLevel}"
|
||||
'-deathmatch'
|
||||
'+set' 'sv_cheats' '1'
|
||||
'+fraglimit' "$fraglimit"
|
||||
'+dmflags' '16384' '+dmflags' '4' '+dmflags' '128' '+dmflags' '4096'
|
||||
'+dmflags2' '512' '+dmflags2' '1024'
|
||||
'-extratic' '-dup' '3'
|
||||
'-warp' "$map"
|
||||
)
|
||||
fi
|
||||
|
||||
# Check for and include if present a wad. Some people may not have it.
|
||||
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
|
||||
gameOption+=" DoomMetalVol7.wad"
|
||||
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
|
||||
gameOption+=" DoomMetalVol6.wad"
|
||||
fi
|
||||
|
||||
# Extend the search for new messages to be read.
|
||||
grepStrings+=('-e' ' died.'
|
||||
'-e' 'Ectoplasmic Surge!'
|
||||
'-e' ' has been '
|
||||
'-e' '^(Armor|Health) boosted!'
|
||||
'-e' 'Lesser demon energy'
|
||||
'-e' '^Found '
|
||||
'-e' 'Got the '
|
||||
'-e' 'Picked up '
|
||||
'-e' '^(Mega|Soul)sphere$'
|
||||
'-e' '^Took '
|
||||
'-e' ' was .*(\.|!)'
|
||||
'-e' '^Vanguard of the gods!$'
|
||||
'-e' "You've found "
|
||||
'-e' 'You (collected|got|found|picked up) ')
|
||||
|
||||
# Launch the game and pipe things to be spoken through speech-dispatcher.
|
||||
# This also leaves the console output intact for people who may want to read it.
|
||||
exec stdbuf -oL ${gzdoom} ${gameOption[@]} "${flags[@]}" | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | grep "${antiGrepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} -- > /dev/null 2>&1; }; echo "$l";done
|
@ -1,23 +0,0 @@
|
||||
check_dependencies() {
|
||||
if [[ $# -lt 2 ]]; then
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "Invalid call to check_dependencies(). Please check your code." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
local packagePath="$1" # Path where the launcher will attempt the package, e.g. ${gamePath/Addons/PACKAGENAME/something.pk3
|
||||
local packageURL="$2" # URL where the package can be downloaded.
|
||||
shift 2
|
||||
if [[ -e "${packagePath}" ]]; then
|
||||
return
|
||||
fi
|
||||
local message=(
|
||||
"You are missing the \"${packagePath##/*}\" Package." $'\n'
|
||||
"You can get it from \"${packageURL}\"" $'\n')
|
||||
echo "${packageURL}" | DISPLAY="${DISPLAY:-:0}" xclip -selection clipboard && message+=("The URL has been copied to the clipboard." $'\n')
|
||||
for i in "${@}" ; do
|
||||
message+=("$i" $'\n')
|
||||
done
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--msgbox "${message[*]}" -1 -1 --stdout
|
||||
exit 1
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
# Choice of maps
|
||||
mapList=(
|
||||
"${gamePath}/OpMDK.wad"
|
||||
"${gamePath}/Addons/MAPS/TobyDoomLevels.wad"
|
||||
"${gamePath}/Addons/MAPS/Toby-Demo-Level.wad"
|
||||
)
|
||||
|
||||
declare -a mapMenu=('none' 'None')
|
||||
for i in "${mapList[@]}" ; do
|
||||
if [[ -e "$i" ]]; then
|
||||
title="${i##*/}"
|
||||
title="${title%.*}"
|
||||
title="${title/OpMDK/Operation MDK}"
|
||||
title="${title/-/ }"
|
||||
mapMenu+=("$i" "$title")
|
||||
fi
|
||||
done
|
||||
map="$(dialog --backtitle "Select Map" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--cancel-label "Exit" \
|
||||
--ok-label "Next" \
|
||||
--menu "Please select one" 0 0 0 "${mapMenu[@]}" --stdout)"
|
||||
[[ $? -ne 0 ]] && exit 0
|
||||
if [[ "${map}" != "none" ]]; then
|
||||
gameOption=("$map" "${gameOption[@]}")
|
||||
fi
|
||||
if [[ "${map}" == ""${gamePath}/TobyDoomLevels.wad"" ]]; then
|
||||
gameOption=("$map" "${gameOption[@]}" "${gamePath}/Toby-Doom-Level-Music-Renamer.pk3")
|
||||
fi
|
@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# check for required wad.
|
||||
source ${BASH_SOURCE[0]%/*}/.dependencies
|
||||
check_dependencies "${gamePath}/aoddoom1.wad" "https://www.moddb.com/mods/army-of-darkness-total-conversion/addons/army-of-darkness-doom-wad" "Place \"aoddoom1.wad\" in \"${gamePath}\"."
|
||||
|
||||
|
||||
gamePath=~/.local/games/doom
|
||||
# Set up the pk3 and wad files
|
||||
gameOption=(
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
|
||||
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
|
||||
"${gamePath}/aoddoom1.wad"
|
||||
)
|
||||
|
||||
# Check for and include if present a wad. Some people may not have it.
|
||||
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
|
||||
gameOption+=("${gamePath}/DoomMetalVol7.wad")
|
||||
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
|
||||
gameOption+=("${gamePath}/DoomMetalVol6.wad")
|
||||
fi
|
||||
|
||||
source ${BASH_SOURCE[0]%/*}/.mapmenu
|
@ -1,123 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Set up the pk3 and wad files
|
||||
gameOption=(
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
|
||||
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
|
||||
)
|
||||
|
||||
# Get a list of pk3s to use for the custom death match.
|
||||
mapfile -t pk3List < <(find "${gamePath}" -maxdepth 1 -mindepth 1 -size +10M -iname '*.pk3')
|
||||
if [[ -e "${gamePath}/aoddoom1.wad" ]]; then
|
||||
pk3List+=("${gamePath}/aoddoom1.wad")
|
||||
fi
|
||||
|
||||
declare -a pk3Menu
|
||||
for i in "${pk3List[@]}" ; do
|
||||
title="${i##*/}"
|
||||
title="${title%.*}"
|
||||
pk3Menu+=("${i}" "${title}")
|
||||
done
|
||||
|
||||
# Death match setup
|
||||
ipAddress="$(dialog --backtitle "Deathmatch Options" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--ok-label "Join" \
|
||||
--cancel-label "Exit" \
|
||||
--extra-button \
|
||||
--extra-label "Host" \
|
||||
--inputbox "Enter ip or URL, required for join." -1 -1 --stdout)"
|
||||
buttonCode=$?
|
||||
[[ $buttonCode -eq 1 ]] && exit 0
|
||||
pk3="$(dialog --backtitle "Select Customization" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--cancel-label "Exit" \
|
||||
--ok-label "Next" \
|
||||
--menu "Please select one" 0 0 0 "${pk3Menu[@]}" --stdout)"
|
||||
[[ $? -ne 0 ]] && exit 0
|
||||
if [[ $buttonCode -eq 0 ]]; then
|
||||
if [[ "${#ipAddress}" -lt 3 ]]; then
|
||||
dialog --backtitle "Deathmatch" --clear --msgbox "No ip address or URL given." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
flags=('-join' "${ipAddress}")
|
||||
else
|
||||
# List of maps included:
|
||||
maps=(
|
||||
"1" "Com Station (2-4 players)"
|
||||
"2" "Warehouse (2-4 players)"
|
||||
"3" "Sector 3 (2-4 players)"
|
||||
"4" "Dungeon of Doom (2-4 players)"
|
||||
"5" "Ocean Fortress (2-4 players)"
|
||||
"6" "Water Treatment Facility (2-4 players)"
|
||||
"7" "Phobos Base Site 4 (2-4 players)"
|
||||
"8" "Hangar Bay 18 (2-4 players)")
|
||||
# Array of how many players a given map supports in dialog rangebox syntax
|
||||
declare -a mapPlayers=(
|
||||
[1]="2 4"
|
||||
[2]="2 4"
|
||||
[3]="2 4"
|
||||
[4]="2 4"
|
||||
[5]="2 4"
|
||||
[6]="2 4"
|
||||
[7]="2 4"
|
||||
[8]="2 4")
|
||||
map="$(dialog --backtitle "Select Map" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--cancel-label "Exit" \
|
||||
--ok-label "Next" \
|
||||
--menu "Please select one" 0 0 0 "${maps[@]}" --stdout)"
|
||||
fraglimit="$(dialog --backtitle "Fraglimit" \
|
||||
--clear \
|
||||
--ok-label "Next" \
|
||||
--cancel-label "Exit" \
|
||||
--rangebox "Select Fraglimit" -1 -1 1 500 20 --stdout)"
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
# Get ip address
|
||||
yourIpAddress="$(curl -4s https://icanhazip.com)"
|
||||
players="$(dialog --backtitle "Host Deathmatch Game" \
|
||||
--clear \
|
||||
--ok-label "Next" \
|
||||
--cancel-label "Exit" \
|
||||
--rangebox "Select number of players. Remember to give them your IP address: ${yourIpAddress}" -1 -1 ${mapPlayers[$map]} --stdout)"
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
skillLevel="$(dialog --backtitle "Host Deathmatch Game" \
|
||||
--clear \
|
||||
--ok-label "Start" \
|
||||
--cancel-label "Exit" \
|
||||
--extra-button \
|
||||
--extra-label "Bots Only" \
|
||||
--rangebox "Select difficulty. 1 easiest, 5 hardest." -1 -1 1 5 3 --stdout)"
|
||||
code=$?
|
||||
[[ $code -eq 1 ]] && exit 0
|
||||
if [[ $code -eq 3 ]]; then
|
||||
players=1
|
||||
dialog --backtitle "Preparing to Launch" \
|
||||
--msgbox "When the game starts, press \` to open the console. Type addbot, press enter. Repeat addbot for as many bots as you would like. Press \` again to close the console." -1 -1 --stdout
|
||||
fi
|
||||
flags=(
|
||||
'-host' "${players}"
|
||||
'-skill' "${skillLevel}"
|
||||
'-deathmatch'
|
||||
'+set' 'sv_cheats' '1'
|
||||
'+fraglimit' "$fraglimit"
|
||||
'+dmflags' '16384' '+dmflags' '4' '+dmflags' '128' '+dmflags' '4096'
|
||||
'+dmflags2' '512' '+dmflags2' '1024'
|
||||
'-extratic' '-dup' '3'
|
||||
'-warp' "$map"
|
||||
)
|
||||
fi
|
||||
|
||||
gameOption+=("${pk3}"
|
||||
"${gamePath}/TobyDeathArena_V1-0.wad"
|
||||
)
|
||||
|
||||
# Check for and include if present a wad. Some people may not have it.
|
||||
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
|
||||
gameOption+=" DoomMetalVol7.wad"
|
||||
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
|
||||
gameOption+=" DoomMetalVol6.wad"
|
||||
fi
|
@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# check for required pk3.
|
||||
source ${BASH_SOURCE[0]%/*}/.dependencies
|
||||
check_dependencies "${gamePath}/GMOTA_V.1.5.2.pk3" \
|
||||
"https://combine-kegan.itch.io/gmota" \
|
||||
"Place the file in ${gamePath}"
|
||||
|
||||
# Set up the pk3 and wad files
|
||||
gameOption=(
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
|
||||
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
|
||||
"$gamePath/Addons/DOOM/TobyV${tobyVersion%%-*}_Proximity.pk3"
|
||||
"${gamePath}/GMOTA_V.1.5.2.pk3"
|
||||
)
|
||||
|
||||
|
||||
source ${BASH_SOURCE[0]%/*}/.mapmenu
|
||||
flags=(
|
||||
# Key bindings
|
||||
'+bind Alt +altattack'
|
||||
'+bind Ctrl +attack'
|
||||
'+bind G +User1'
|
||||
'+bind U unreloader'
|
||||
# Variables
|
||||
'+Toby_NarrationOutputType 2'
|
||||
'+pb_exaggeratedrecoil false'
|
||||
'+pb_weapon_recoil_mod_horizontal 0'
|
||||
'+pb_weapon_recoil_mod_vertical 0'
|
||||
'+vertspread true'
|
||||
)
|
@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# check for required pk3.
|
||||
source ${BASH_SOURCE[0]%/*}/.dependencies
|
||||
check_dependencies "${gamePath}/Project_Brutality.pk3" \
|
||||
"https://www.moddb.com/mods/project-brutality" \
|
||||
"This should be included by default." \
|
||||
'If you are seeing this message, please reinstall after removing any TobyDoom files from ~/.cache/linux-game-manager.' \
|
||||
'rm -f ~/.cache/linux-game-manager/TobyAccessibilityMod_Version*'
|
||||
|
||||
# Set up the pk3 and wad files
|
||||
gameOption=(
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
|
||||
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
|
||||
"$gamePath/Addons/DOOM/TobyV${tobyVersion%%-*}_Proximity.pk3"
|
||||
"${gamePath}/PB-Toby-Compatibility-Addon.pk3"
|
||||
"${gamePath}/Project_Brutality.pk3"
|
||||
)
|
||||
|
||||
# Check for and include if present a wad. Some people may not have it.
|
||||
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
|
||||
gameOption+=("${gamePath}/DoomMetalVol7.wad")
|
||||
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
|
||||
gameOption+=("${gamePath}/DoomMetalVol6.wad")
|
||||
fi
|
||||
|
||||
source ${BASH_SOURCE[0]%/*}/.mapmenu
|
||||
flags=(
|
||||
# Key bindings
|
||||
'+bind Alt +altattack'
|
||||
'+bind Ctrl +attack'
|
||||
'+bind G +User1'
|
||||
'+bind U unreloader'
|
||||
# Variables
|
||||
'+pb_exaggeratedrecoil false'
|
||||
'+pb_weapon_recoil_mod_horizontal 0'
|
||||
'+pb_weapon_recoil_mod_vertical 0'
|
||||
'+vertspread true'
|
||||
)
|
@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# check for required pk3.
|
||||
source ${BASH_SOURCE[0]%/*}/.dependencies
|
||||
check_dependencies "${gamePath}/Project_Brutality-Latest.pk3" \
|
||||
"https://www.moddb.com/mods/project-brutality" \
|
||||
"This should be included by default." \
|
||||
'If you are seeing this message, please reinstall after removing any TobyDoom files from ~/.cache/linux-game-manager.' \
|
||||
'rm -f ~/.cache/linux-game-manager/TobyAccessibilityMod_Version*'
|
||||
|
||||
# Set up the pk3 and wad files
|
||||
gameOption=(
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
|
||||
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
|
||||
"$gamePath/Addons/DOOM/TobyV${tobyVersion%%-*}_Proximity.pk3"
|
||||
"${gamePath}/Project_Brutality-Latest.pk3"
|
||||
)
|
||||
|
||||
# Check for and include if present a wad. Some people may not have it.
|
||||
if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then
|
||||
gameOption+=("${gamePath}/DoomMetalVol7.wad")
|
||||
elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then
|
||||
gameOption+=("${gamePath}/DoomMetalVol6.wad")
|
||||
fi
|
||||
|
||||
source ${BASH_SOURCE[0]%/*}/.mapmenu
|
||||
flags=(
|
||||
# Key bindings
|
||||
'+bind Alt +altattack'
|
||||
'+bind Ctrl +attack'
|
||||
'+bind G +User1'
|
||||
'+bind U unreloader'
|
||||
# Variables
|
||||
'+Toby_NarrationOutputType 2'
|
||||
'+pb_exaggeratedrecoil false'
|
||||
'+pb_weapon_recoil_mod_horizontal 0'
|
||||
'+pb_weapon_recoil_mod_vertical 0'
|
||||
'+vertspread true'
|
||||
)
|
@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Extend sed strings to handle the player class menu
|
||||
sedStrings+=('-e' 's/^Playerclassmenu$/Player class menu/')
|
||||
# Set up the pk3 and wad files
|
||||
gameOption=(
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
|
||||
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
|
||||
"${gamePath}/Xim-StarWars-v3.1.5.pk3"
|
||||
"$gamePath/Addons/STARWARS/"*
|
||||
)
|
||||
|
||||
source ${BASH_SOURCE[0]%/*}/.mapmenu
|
@ -1,38 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# check for required pk3.
|
||||
source ${BASH_SOURCE[0]%/*}/.dependencies
|
||||
check_dependencies "${gamePath}/Addons/WOLFENDOOM/orig_enh.pk3" \
|
||||
"https://www.moddb.com/mods/wolfendoom/downloads/wolfendoom-enhanced" \
|
||||
"mkdir -p ${gamePath}/Addons/WOLFENDOOM/" \
|
||||
"Place all pk3 files from the zip archive in:" \
|
||||
"${gamePath}/Addons/WOLFENDOOM/" \
|
||||
"There should be three of them noct_enh.pk3, orig_enh.pk3, and sod_enh.pk3"
|
||||
|
||||
# Set up the pk3 and wad files
|
||||
gameOption=(
|
||||
"${gamePath}/TobyAccMod_V${tobyVersion}.pk3"
|
||||
"$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"*
|
||||
"$gamePath/Addons/DOOM/TobyV${tobyVersion%%-*}_"*"Proximity"*".pk3"
|
||||
)
|
||||
|
||||
menuList=("${gamePath}/Addons/WOLFENDOOM/orig_enh.pk3" "WolfenDoom"
|
||||
"${gamePath}/Addons/WOLFENDOOM/sod_enh.pk3" "WolfenDoom - Spear of Destiny"
|
||||
"${gamePath}/Addons/WOLFENDOOM/noct_enh.pk3" "WolfenDoom - Nocturne"
|
||||
)
|
||||
|
||||
pk3=$(dialog --backtitle "Select Game" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--cancel-label "Exit" \
|
||||
--ok-label "Next" \
|
||||
--menu "Please select one" 0 0 0 "${menuList[@]}" --stdout)
|
||||
[[ $? -ne 0 ]] && exit 0
|
||||
gameOption+=("${pk3}")
|
||||
flags=(
|
||||
# Key bindings
|
||||
'+bind Ctrl +attack'
|
||||
'+bind X turn180'
|
||||
# Variables
|
||||
'+Toby_NarrationOutputType 2'
|
||||
)
|
@ -1,88 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
# Function to check if a file is an IWAD
|
||||
is_iwad() {
|
||||
local file="$1"
|
||||
[[ "${file,,}" =~ ipk3$ ]] && return 0
|
||||
if [[ -f "$file" ]]; then
|
||||
# Extract the first four bytes and check if they match the IWAD signature
|
||||
if hexdump -n 4 -e '4/1 "%02X"' "$file" | grep -q '^49574144$'; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
iwad_menu() {
|
||||
# Extract the Path= lines from the [IWADSearch.Directories] section
|
||||
mapfile -t wadPaths < <(sed -n "/^\[IWADSearch.Directories\]/,/^\[/{/Path=/p;}" "$configFile" | cut -d '=' -f 2)
|
||||
declare -A uniqueWads
|
||||
for i in "${wadPaths[@]}"; do
|
||||
if [[ -d "$i" ]]; then
|
||||
while IFS= read -r -d $'\0' wad; do
|
||||
if is_iwad "$wad"; then
|
||||
wad_name=$(basename "$wad")
|
||||
uniqueWads["${wad_name,,}"]="$wad"
|
||||
fi
|
||||
done < <(find "$i" -follow -maxdepth 1 -type f \( -iname '*.wad' -o -iname '*.ipk3' \) -print0)
|
||||
fi
|
||||
done
|
||||
wadList=("${uniqueWads[@]}")
|
||||
# Set up the menu
|
||||
declare -a wadMenu
|
||||
for path in "${wadList[@]}" ; do
|
||||
title="${path##*/}"
|
||||
title="${title%.*}"
|
||||
wadMenu+=("${title}" "${path}")
|
||||
done
|
||||
# Run yad to display the dialog
|
||||
iwad=$(yad --list \
|
||||
--title="Yadoom" \
|
||||
--text="Select an Iwad" \
|
||||
--column="Iwad" \
|
||||
--column="Path" \
|
||||
--button="Launch:0" \
|
||||
--button="Close:1" \
|
||||
--hide-column=2 \
|
||||
--search-column=1 \
|
||||
--skip-taskbar \
|
||||
"${wadMenu[@]}")
|
||||
yadCode="$?"
|
||||
[[ ${yadCode} -eq 0 ]] || exit 0
|
||||
iwad="${iwad#*|}"
|
||||
iwad="${iwad%|}"
|
||||
}
|
||||
|
||||
configFile="${XDG_CONFIG_HOME:-$HOME/.config}/gzdoom/gzdoom.ini"
|
||||
declare -a gzdoomArgs
|
||||
|
||||
# Process arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
-c)
|
||||
configFile="$2"
|
||||
shift 2
|
||||
;;
|
||||
-iwad|-i)
|
||||
iwad="$2"
|
||||
gzdoomArgs+=("-iwad" "$2")
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
gzdoomArgs+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# If no IWAD specified, show the menu
|
||||
if [[ -z "$iwad" ]]; then
|
||||
iwad_menu
|
||||
gzdoomArgs+=("-iwad" "$iwad")
|
||||
fi
|
||||
|
||||
# Launch GZDoom with all arguments
|
||||
gzdoom "${gzdoomArgs[@]}"
|
@ -111,13 +111,16 @@ check_dependencies() {
|
||||
|
||||
# Function to open a terminal emulator
|
||||
terminal_emulator() {
|
||||
# Arguments workingDirectory, rest of arguments
|
||||
local workingDir="$1"
|
||||
shift
|
||||
terminals=(
|
||||
"lxterminal"
|
||||
"mate-terminal"
|
||||
"gnome-terminal"
|
||||
)
|
||||
for i in "${terminals[@]}" ; do
|
||||
if command $i --working-directory="${game%/*}" -e $* ; then
|
||||
if command $i --working-directory="${workingDir}" -e "$@" ; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
Reference in New Issue
Block a user