diff --git a/install_scenario.ps1 b/install_scenario.ps1 new file mode 100644 index 0000000..607d1b5 --- /dev/null +++ b/install_scenario.ps1 @@ -0,0 +1,12 @@ +$fileId = "1eEBGmfh7Gu2g_KQoCiVg8XsRM9m_-DZB" +$baseUrl = "https://drive.google.com/uc?export=download&id=$fileId" + +$rimworldPath = Join-Path $env:USERPROFILE "AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios" +$rimworldConfigPath = Join-Path $rimworldPath "Scenarios\RuinShip.rsc" + +$response = Invoke-WebRequest -Uri $baseUrl -SessionVariable session + +Write-Host "[INFO] Downloading scenario..." +Invoke-WebRequest -Uri $baseUrl -OutFile $rimworldConfigPath + +Write-Host "[INFO] RuinShip.rsc was successfully downloaded." -ForegroundColor Green \ No newline at end of file diff --git a/setup.bat b/setup.bat index fffda4f..f14feef 100644 --- a/setup.bat +++ b/setup.bat @@ -15,6 +15,10 @@ if "%1"=="-mode" ( call :ModsConfigInstall goto end ) + if "%2"=="scenario" ( + call :ScenarioInstall + goto end + ) echo Ошибка: Режима %2 не существует goto end ) @@ -41,8 +45,8 @@ if /i "%choice%"=="2" ( goto ask ) if /i "%choice%"=="3" ( - - echo Пока функция не готова. Вам что-то ещё? + call :ScenarioInstall + echo Вам что-то ещё? goto ask ) if /i "%choice%"=="4" ( @@ -60,15 +64,21 @@ echo Варианта %choice% не существует goto ask :: Функции -:ModsConfigInstall -powershell -ExecutionPolicy Bypass -File "%~dp0install_modsconfig.ps1" -goto :eof - :modsInstall powershell -ExecutionPolicy Bypass -File "%~dp0download_mods.ps1" goto :eof +:ScenarioInstall +powershell -ExecutionPolicy Bypass -File "%~dp0install_scenario.ps1" +goto :eof + +:ModsConfigInstall +powershell -ExecutionPolicy Bypass -File "%~dp0install_modsconfig.ps1" +goto :eof + :installAll +powershell -ExecutionPolicy Bypass -File "%~dp0install_modsconfig.ps1" +powershell -ExecutionPolicy Bypass -File "%~dp0install_scenario.ps1" powershell -ExecutionPolicy Bypass -File "%~dp0download_mods.ps1" goto :eof