diff --git a/download_mods.ps1 b/download_mods.ps1 index 4d4274b..cacf216 100644 --- a/download_mods.ps1 +++ b/download_mods.ps1 @@ -6,9 +6,17 @@ $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition $rimworldMods = Resolve-Path (Join-Path $scriptDir "..") if (-not($rimworldMods -like "*Mods")) { - Write-Host "[Error] Place this program in the Mods folder of the RimWorld game" -ForegroundColor Red - Pause - exit + Write-Host "[WARNING] The program is not located in the Mods folder of the RimWorld game. The game will now be searched in the steam library." -ForegroundColor Yellow + + Write-Host "[INFO] Search for a game on steam..." + + $rimworldMods = "C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods" + + if (-not(Test-Path $rimworldMods)) { + Write-Host "[ERROR] Place this program in the Mods folder of the RimWorld game" -ForegroundColor Red + Pause + exit + } } Write-Host "[INFO] Sending a request to google disk..." @@ -27,7 +35,7 @@ if ($form) { $uriBuilder.Query = $queryString $downloadUrl = $uriBuilder.Uri.AbsoluteUri - Write-Host "[INFO] Downloading mods (~5000 0000 bytes)..." + Write-Host "[INFO] Downloading mods (~50 000 000 bytes)..." Invoke-WebRequest -Uri $downloadUrl -WebSession $session -OutFile $outputFile Write-Host "[INFO] The file was successfully downloaded with confirmation." }