From efb7c0520c3a31a5a681e25c3b3b3b9dc6e639de Mon Sep 17 00:00:00 2001 From: HypoxiE Date: Tue, 12 Aug 2025 01:00:40 +0700 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=20=D1=84?= =?UTF-8?q?=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F=20=D1=83=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BA=D0=B8=20=D1=81=D1=86=D0=B5=D0=BD=D0=B0?= =?UTF-8?q?=D1=80=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install_scenario.ps1 | 12 ++++++++++++ setup.bat | 22 ++++++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 install_scenario.ps1 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