From 00fd137934edf266c92272284129f7ee1c320cc3 Mon Sep 17 00:00:00 2001 From: "Davi (Debiddo) Gooz de Souza Filho" Date: Sun, 17 Oct 2021 16:21:28 -0300 Subject: [PATCH] Allow flags like -definebones now able to use any flag that your StudioMDL have, thx to $@ variable Brigadu, de nada --- StudioMDL.sh | 56 +++++++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/StudioMDL.sh b/StudioMDL.sh index b500ccc..31e378a 100644 --- a/StudioMDL.sh +++ b/StudioMDL.sh @@ -5,7 +5,7 @@ export WINEDEBUG="-all" export VPROJECT="/mnt/500GB/source1/0xdecompiled" export SteamLibrary="/mnt/500GB/SteamLibrary/steamapps/common" -export CompileFlags="-verbose -printbones -fastbuild -fullcollide -collapsereport -dumpmaterials -nop4 -nox360 -n -h -parsecompletion" +export CompileFlags="-verbose -printbones -fastbuild -fullcollide -collapsereport -dumpmaterials -nop4 -nox360 -n -h -parsecompletion $@" export SFM="Z:$SteamLibrary/SourceFilmmaker/game/usermod" export SFMbin="$SteamLibrary/SourceFilmmaker/game/bin" @@ -23,7 +23,7 @@ cd $SFMbin title="\n\e[0;38;5;220mStudioMDL script para Source Engine. por: Davi (Debiddo) Gooz\e[0m\n" prompt="Selecione uma opção: jogo ou compilar: " options=("GMod" "SFM" "L4D2" "Compile") -gamemsg="O jogo selecionado é agora é" +gamemsg="\nO jogo selecionado é agora é" compilemsg="Compilando para o relativo jogo em:\n\e[1;49;97m\"$GAME/models\"\e[0m\n" echo -e "\nStudioMDL rodando em \e[1;49;97m\"$WINEARCH\"\e[0m dentro do prefixo \e[1;49;97m\"$WINEPREFIX\"\e[0m\n @@ -41,70 +41,58 @@ echo -e "$title" PS3="$prompt" select opt in "${options[@]}" "Quit"; do case "$REPLY" in - 1) echo "$gamemsg Garry's Mod" + 1) echo -e "$gamemsg \e[1;49;97m\Garry's Mod\e[0m" export GAME=$GMod cd $GModbin;echo;; - g) echo "$gamemsg Garry's Mod" - export GAME=$GMod - cd $GModbin;echo;; - gmod) echo "$gamemsg Garry's Mod" + g*) echo -e "$gamemsg \e[1;49;97m\Garry's Mod" export GAME=$GMod cd $GModbin;echo;; - 2) echo "$gamemsg Source Filmmaker" + 2) echo -e "$gamemsg \e[1;49;97m\Source Filmmaker\e[0m" export GAME=$SFM cd $SFMbin;echo;; - s) echo "$gamemsg Source Filmmaker" - export GAME=$SFM - cd $SFMbin;echo;; - sfm) echo "$gamemsg Source Filmmaker" + s*) echo -e "$gamemsg \e[1;49;97m\Source Filmmaker\e[0m" export GAME=$SFM cd $SFMbin;echo;; - 3) echo "$gamemsg Left 4 Dead 2" + 3) echo -e "$gamemsg \e[1;49;97m\Left 4 Dead 2\e[0m" export GAME="$L4D2" - cd "$L4D2bin";echo;; - l) echo "$gamemsg Left 4 Dead 2" + cd "$L4D2bin"; + echo -e "\npara compilar, digite \e[1;49;97m\"lc\"\e[0m";; + l) echo -e "$gamemsg \e[1;49;97m\Left 4 Dead 2\e[0m" export GAME="$L4D2" - cd "$L4D2bin";echo;; - l4d2) echo "$gamemsg Left 4 Dead 2" + cd "$L4D2bin"; + echo -e "\npara compilar, digite \e[1;49;97m\"lc\"\e[0m";; + l4d*) echo -e "$gamemsg \e[1;49;97m\Left 4 Dead 2\e[0m" export GAME="$L4D2" - cd "$L4D2bin";echo;; + cd "$L4D2bin"; + echo -e "\npara compilar, digite \e[1;49;97m\"lc\"\e[0m";; # Compile part: 4) echo -e "$compilemsg" read -p "QC: " qcfile env wine studiomdl $CompileFlags -game "$GAME" "V:/0xdecompiled/$qcfile" echo -e $title;; - c) echo -e "$compilemsg" - read -p "QC: " qcfile - env wine studiomdl $CompileFlags -game "$GAME" "V:/0xdecompiled/$qcfile" - echo -e $title;; - m) echo -e "$compilemsg" - read -p "QC: " qcfile - env wine studiomdl $CompileFlags -game "$GAME" "V:/0xdecompiled/$qcfile" - echo -e $title;; - mdl) echo -e "$compilemsg" + c*) echo -e "$compilemsg" read -p "QC: " qcfile env wine studiomdl $CompileFlags -game "$GAME" "V:/0xdecompiled/$qcfile" echo -e $title;; - compile) echo -e "$compilemsg" + m*) echo -e "$compilemsg" read -p "QC: " qcfile env wine studiomdl $CompileFlags -game "$GAME" "V:/0xdecompiled/$qcfile" echo -e $title;; # Especial para l4d2 - lc) echo -e "\nCompilando especialmente para \e[1;49;97mLeft 4 Dead 2\e[0m em:\n\e[1;49;97m\"$GAME/models\"\e[0m\n" + lc*) echo -e "\nCompilando especialmente para \e[1;49;97mLeft 4 Dead 2\e[0m em:\n\e[1;49;97m\"$GAME/models\"\e[0m\n" read -e -p "QC: " qcfile cd "$L4D2bin" - env WINEPREFIX=/mnt/500GB/SteamLibrary/steamapps/compatdata/563/pfx "$proton4" ./studiomdl.exe '-checklenghts -n -h -printbones -printgraph -nox360 -fastbuild -dumpmaterials -nop4 -verbose' -game "$L4D2" "V:/0xdecompiled/$qcfile" + env WINEPREFIX=/mnt/500GB/SteamLibrary/steamapps/compatdata/563/pfx "$proton4" ./studiomdl.exe '-checklenghts -n -h -printbones -printgraph -nox360 -fastbuild -dumpmaterials -nop4 -verbose' "$@" -game "$L4D2" "V:/0xdecompiled/$qcfile" echo -e "\n$title\n";; $((${#options[@]}+1))) break;; - quit) break;; - sair) break;; - q) break;; - *) echo -e "\e[0;38;5;160mOpção inválida. Tente outra.\e[0m\n" + e*) break;; + q*) break;; + *) echo -e "\e[0;38;5;160mOpção inválida. Tente outra.\e[0m\n"; continue;; esac done