@echo off rem AirDef: ставит мод и запускает игру (Windows). Лежит рядом с horizon-client.exe и airdef.hmod. chcp 65001 >nul setlocal enabledelayedexpansion set "HERE=%~dp0" if "%HORIZON_HOME%"=="" (set "GAME=%APPDATA%\horizon") else (set "GAME=%HORIZON_HOME%") if not exist "%GAME%\horizon-mods" mkdir "%GAME%\horizon-mods" copy /y "%HERE%airdef.hmod" "%GAME%\horizon-mods\airdef.hmod" >nul if exist "%GAME%\horizon-mods\airdef" rmdir /s /q "%GAME%\horizon-mods\airdef" set "LIST=%GAME%\horizon-mods.txt" if not exist "%LIST%" type nul > "%LIST%" findstr /v /b "mod.airdef:" "%LIST%" > "%LIST%.tmp" echo mod.airdef:true>> "%LIST%.tmp" move /y "%LIST%.tmp" "%LIST%" >nul set "RES=%HORIZON_RESOURCES%" if "%RES%"=="" ( for /d %%V in ("%APPDATA%\horizon-launcher\versions\*") do ( if exist "%%V\.local\horizon-client\26.3" set "RES=%%V\.local\horizon-client\26.3" ) ) if "%RES%"=="" ( echo Не найдены ресурсы игры: установи Horizon через лаунчер и запусти его один раз. pause exit /b 1 ) cd /d "%GAME%" "%HERE%horizon-client.exe" --resources "%RES%" %*