From e424b7243c8e182b89d0cce241f6e4d265d5c84f Mon Sep 17 00:00:00 2001 From: Michael Taboada Date: Tue, 1 Aug 2023 18:14:57 -0700 Subject: [PATCH] Attempt to install and simlink mods. --- linux-game-manager.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/linux-game-manager.sh b/linux-game-manager.sh index e97c30f..4a77a72 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -697,9 +697,9 @@ case "${game}" in add_launcher "${installPath}/S.E.A./SEA" ;; "Slay the Spire") - if ! [[ -f ~/Downloads/slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh ]] && ! [[ -f ~/Desktop/slay_the_spire_2020_12_15_8735c9fe3cc2280b76aa3ec47c953352a7df1f65_43444.sh ]]; then check_dependencies steamcmd 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 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 @@ -726,6 +726,28 @@ case "${game}" in 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 mods=( + [mod the spire]=1605060445 + [base mod]=1605833019 + [stslib]=1609158507 + [curses come first]=2304840098 + [achievement enabler]=1692554109 + [say the spire]=2239220106 + ) + installString="" + for x in ${mods[@]} ; do + installString="$installString +workshop_download_item $appId $x" + done + steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire/" +login anonymous $installString +quit + mkdir "$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/" + else + ln -sr "$HOME/.local/games/SlayTheSpire/steamapps/workshop/content/$appId/${mods[$x]}"/* "$HOME/.local/games/SlayTheSpires/mods/" + fi + done launcherPath="$(readlink -f "$0")" launcherPath="${launcherPath%/*}" add_launcher "${launcherPath}/.scripts/SlayTheSpire.sh"