Files
linux-game-manager/.install/Slay the Spire.sh
Storm Dragon 647e97a105 Added game The Omega Reach
Update the alert function to show the actual guidance in a single acknowledgement dialog instead of a generic OK prompt followed by a separate message.
2026-03-02 22:56:05 -05:00

72 lines
3.7 KiB
Bash

# shellcheck shell=bash disable=SC2154 # installPath and cache are set by linux-game-manager.sh
check_architecture x86_64
alert "Game Installer" "Game Installer" "Please note this requires the game to be available either in your Steam library or as the installer purchased from gog.com.\n\nIf using the gog.com installer, please use the default path when prompted."
installMethod=$(ui_menu "Installation Method" "Installation Method" "Select installation method" "gog" "GOG" "steam" "Steam")
appId="646570"
gogFileName="slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh"
if [[ "$installMethod" == "steam" ]]; then
# Steam Installation
check_dependencies steamcmd
steamUser=$(ui_inputbox "Game Installer" "Game Installer" "Please enter Steam user name:" "")
if ! steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire" +login "$steamUser" +app_update "$appId" +quit; then
ui_msgbox "Game Installer" "Game Installer" "Error installing game through Steam."
exit 1
fi
else
# GOG Installation
get_installer "$gogFileName" "https://www.gog.com/en/game/slay_the_spire"
if DISPLAY="" find ~/Downloads -maxdepth 1 -type f -name "$gogFileName" -exec bash "{}" \; ||
DISPLAY="" find ~/Desktop -maxdepth 1 -type f -name "$gogFileName" -exec bash "{}" \;; then
ln -sf "${HOME}/GOG Games/Slay the Spire/game" "${installPath}/SlayTheSpire" ||
{ ui_msgbox "Game Installer" "Game Installer" "Error creating link to game directory."
exit 1; }
else
ui_msgbox "Game Installer" "Game Installer" "Error installing game from GOG installer."
exit 1
fi
fi
# Move files into place
mkdir -p "${HOME}/.config/ModTheSpire"
if [[ -f ~"/.config/ModTheSpire/mod_lists.json" ]]; then
ui_yesno "Game Installer" "Game Installer" "Existing mod_lists.json file found. Would you like to replace it?" &&
cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json"
else
cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json"
fi
cp -v .files/SlayTheSpire/MTS.sh "${HOME}/.local/games/SlayTheSpire/"
# Get mods
declare -A modsMap=(
[mod the spire]=1605060445
[base mod]=1605833019
[stslib]=1609158507
[curses come first]=2304840098
[achievement enabler]=1692554109
[say the spire]=2239220106
)
declare -a installArgs=()
for modId in "${modsMap[@]}" ; do
installArgs+=("+workshop_download_item" "$appId" "$modId")
done
if ! steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire/" +login anonymous "${installArgs[@]}" +quit; then
ui_msgbox "Game Installer" "Game Installer" "Error installing required mods. Some accessibility features may not be available."
exit 1
fi
mkdir -p "$HOME/.local/games/SlayTheSpire/mods"
for modName in "${!modsMap[@]}" ; do
if [[ "$modName" == "mod the spire" ]]; then
if ! ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${modsMap[$modName]}"/* "$HOME/.local/games/SlayTheSpire/"; then
if [[ "$modName" == "say the spire" ]]; then
ui_msgbox "Game Installer" "Game Installer" "Error installing SayTheSpire mod. Screen reader support will not be available."
exit 1
fi
fi
else
if ! ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${modsMap[$modName]}"/* "$HOME/.local/games/SlayTheSpire/mods/"; then
if [[ "$modName" == "say the spire" ]]; then
ui_msgbox "Game Installer" "Game Installer" "Error installing SayTheSpire mod. Screen reader support will not be available."
exit 1
fi
fi
fi
done