Skip to content

Commit

Permalink
store skip commands in variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic2kk committed Jun 17, 2024
1 parent 8c4a4f7 commit e706684
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20240617-2 (fix-gamelaunch-steamappscommon)"
PROGVERS="v14.0.20240617-3 (fix-gamelaunch-steamappscommon)"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -26852,11 +26852,15 @@ function main {
fi
fi
elif grep -q "$SAC" <<< "$@" || grep -q "$L2EA" <<< "$@"; then
# We check if incoming commands contain 'steamapps/common' to interpret them as game launch commands
# But if $1 is a known command in this list, explicitly pass it to 'commandline' as we know it is NOT a game command
STLINCOMINGSKIPCOMMANDS="otr|onetimerun"

if grep -q "update" <<< "$@" || grep -q "^play" <<< "$@" ; then
commandline "$@"
# HACK: Since we check for steamapps/common ($SAC), commands which contain this (such as a one-time run path) will incorrectly get triggered as a game launch
# As a workaround, skip a hardcoded set of commands and pass directly to commandline (i.e. if we have OTR as our first option, pass down to commandline function and run otr)
elif grep -qwE "otr|onetimerun" <<< "${1}"; then
elif grep -qwE "${STLINCOMINGSKIPCOMMANDS}" <<< "${1}"; then
commandline "$@"
else
setGameVars "$@"
Expand Down

0 comments on commit e706684

Please sign in to comment.