Attempt to install and simlink mods.
This commit is contained in:
		| @@ -697,9 +697,9 @@ case "${game}" in | |||||||
|         add_launcher "${installPath}/S.E.A./SEA" |         add_launcher "${installPath}/S.E.A./SEA" | ||||||
|         ;; |         ;; | ||||||
|     "Slay the Spire") |     "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 |             check_dependencies steamcmd | ||||||
|             appId="646570" |             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:" |             echo "Please enter Steam user name:" | ||||||
|             read -er steamUser |             read -er steamUser | ||||||
|             steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir "${HOME}/.local/games/SlayTheSpire" +login "$steamUser" +app_update "$appId" +quit |             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" |             cp -v .files/SlayTheSpire/mod_lists.json "${HOME}/.config/ModTheSpire/mod_lists.json" | ||||||
|         fi |         fi | ||||||
|         cp -v .files/SlayTheSpire/MTS.sh "${HOME}/.local/games/SlayTheSpire/" |         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="$(readlink -f "$0")" | ||||||
|         launcherPath="${launcherPath%/*}" |         launcherPath="${launcherPath%/*}" | ||||||
|         add_launcher "${launcherPath}/.scripts/SlayTheSpire.sh" |         add_launcher "${launcherPath}/.scripts/SlayTheSpire.sh" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user