@echo off setlocal enabledelayedexpansion REM Launches System Shock with every mod built under modding\dist\mods\ REM applied (see modding/README.md section 4). Each mod's own REM modding\dist\mods\\mod\ folder is passed to systemshock.exe as a REM separate, absolute argument - see run-mods.sh's comment for why (same REM engine, same one-level directory scan and same relative-path pitfall). cd /d "%~dp0" set "MODS_DIR=%~dp0..\modding\dist\mods" set "MOD_ARGS=" if exist "%MODS_DIR%" ( for /d %%M in ("%MODS_DIR%\*") do ( if exist "%%M\mod" set "MOD_ARGS=!MOD_ARGS! "%%~fM\mod"" ) ) systemshock.exe !MOD_ARGS! %* exit /b %errorlevel%