Continuing work on Slay the Spire. It didn't do well in the move.
This commit is contained in:
parent
a624691b0d
commit
a33c4a3c23
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}"
|
#!/usr/bin/env bash
|
||||||
"${launcherPath}/.scripts/SlayTheSpire.sh"
|
|
||||||
|
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
|
|
Loading…
Reference in New Issue
Block a user