text stringlengths 0 834k |
|---|
set ""i=0"" |
:SteamLoop |
if defined Mods[%i%] ( |
set ""list=%list% +workshop_download_item 107410 !Mods[%i%]! validate"" |
set /a ""i+=1"" |
goto :SteamLoop |
) |
%--steam%\steamcmd.exe +login ""%--user%"" ""%--pass%"" %list% +exit |
echo. |
echo Done |
echo. |
echo Linking Mods and Keys to SERVER Directory |
echo. |
set ""modDir=%--steam%\steamapps\workshop\content\107410"" |
:: list of allowed characters to convert the mod name |
:: to folder name (yep space is allowed) |
set ""_ALLOWED=ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789-"" |
:: replace them with - (why just don't do =-) |
set ""_REPLWITH=%_ALLOWED:~-1%"" |
set ""i=0"" |
:LinkLoop |
if defined Mods[%i%] ( |
for /f usebackq^ tokens^=2^ delims^=^"" %%A in (`findstr /C:name ""%modDir%\!Mods[%i%]!\meta.cpp""`) do ( |
set ""_modname=%%~nA"" |
call :convrt foldername _modname |
MKLINK /J ""%--server%\@!foldername!"" ""%modDir%\!Mods[%i%]!"" |
for %%B IN (""%modDir%\!Mods[%i%]!\keys\*.bikey"") DO ( |
MKLINK ""%--server%\keys\%%~nxB"" ""%%~B"" |
) |
) |
set /a ""i+=1"" |
goto :LinkLoop |
) |
echo. |
echo Done |
echo ======================================================================== |
echo UPDATED MODS SUSSEFULLY |
echo. |
echo. |
echo. |
echo. |
echo Author: Jogufe |
echo Credits: Joew, tinboye |
goto :eof |
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
:: :convrt subroutine to remove a list of not allowed characters and replace |
:: them with another character. |
:: |
:: Parameters (passed by reference): |
:: %1 (output) variable name |
:: %2 (input) variable name |
:: Returns: |
:: - any `~` tilde character unchanged (""it's not a bug, it's a feature"") |
:: - wrong result for any `%` percent sign present in a file name (it's a bug) |
:convrt |
SETLOCAL enableextensions disabledelayedexpansion |
set ""__auxAll=%~2"" |
call set ""__auxAll=%%%~2%%"" |
::echo sub %~2 ""%__auxAll%"" |
set ""__result="" |
:ConvrtLoop |
if ""%__auxAll%""=="""" goto :EndConvrt |
set ""__auxOne=%__auxAll:~0,1%"" |
set ""__auxAll=%__auxAll:~1%"" |
call set ""__changed=%%_ALLOWED:%__auxOne%=%%"" |
if not ""%__changed%""==""%_ALLOWED%"" ( |
set ""__result=%__result%%__auxOne%"" |
) else ( |
set ""__result=%__result%%_REPLWITH%"" |
) |
goto :ConvrtLoop |
:EndConvrt |
::echo sub %~1 ""%__result%"" |
ENDLOCAL&call set ""%~1=%__result%"" |
goto :eof |
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
:: :help subroutine |
:help |
echo. |
echo You can set the following arguments: |
echo --user : Steam username. |
echo --pass : Steam password. |
echo --mods : Path to the text file containing the mods list. |
echo --steamcmd : Path to the folder where steam cmd is installed. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.