Attempt to install and simlink mods.

This commit is contained in:
Michael Taboada 2023-08-01 18:14:57 -07:00
parent 582cbb8ca8
commit e424b7243c

View File

@ -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"