From 18fd5f3c230a5ede9fa90aa5d999ee89cd250d21 Mon Sep 17 00:00:00 2001 From: Eskild Hustvedt Date: Mon, 29 Apr 2024 23:19:15 +0200 Subject: [PATCH] Implemented MO2 silent mode (#1097) --- steamtinkerlaunch | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index e3ab0c83..4b7e7066 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -7,7 +7,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20240429-1" +PROGVERS="v14.0.20240330-1" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -19820,29 +19820,26 @@ function prepMO2 { GMO2EXE="$GPFX/$MOERPATH" fi -# silent mode doesn't work, feel free to create a PR if [ "$MO2MODE" == "silent" ]; then + setMO2Vars + MO2GAMIN1="$(grep -m1 "\"$AID\"" "$MO2GAMES" | cut -d ';' -f3)" + MO2GAMINI="${MO2GAMIN1//\"}" -MO2MODE="gui" - -function disabledWIPSilentMode { - if [ -n "$MO2GAM" ] && [ -f "$MO2EXE" ]; then + if [ -n "$MO2GAMINI" ] && [ -f "$MO2EXE" ]; then if [ "$(grep -c "^+" "$MODLIST")" -eq 0 ]; then writelog "SKIP" "${FUNCNAME[0]} - Not starting $MO silent as requested, because no mod is enabled in '$MODLIST'" notiShow "$(strFix "$NOTY_NOMO" "$GN" "$AID")" MO2MODE="gui" else - # both seem to work: - RUNCMD=("${RUNCMD[@]}" "$GMO2EXE" "moshortcut://$MO2GAM:$MO2GAMINI" "-p" "Default") + RUNCMD=("${RUNCMD[@]}" "$MO2EXE" "moshortcut://:$MO2GAMINI") writelog "INFO" "${FUNCNAME[0]} - Starting '$SGNAID' with $MO enabled mods with command '${RUNCMD[*]}'" notiShow "$(strFix "$NOTY_STARTSIMO" "$GN" "$AID")" fi else - writelog "SKIP" "${FUNCNAME[0]} - Not starting $MO silent as requested, because MO2GAM ('$MO2GAM') or MO2EXE ('$MO2EXE') is empty" + writelog "SKIP" "${FUNCNAME[0]} - Not starting $MO silent as requested, because MO2GAMINI ('$MO2GAMINI') or MO2EXE ('$MO2EXE') is empty" MO2MODE="gui" fi -} fi if [ "$MO2MODE" == "gui" ]; then