Добавлен поиск игры
This commit is contained in:
@@ -6,9 +6,17 @@ $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
|||||||
$rimworldMods = Resolve-Path (Join-Path $scriptDir "..")
|
$rimworldMods = Resolve-Path (Join-Path $scriptDir "..")
|
||||||
|
|
||||||
if (-not($rimworldMods -like "*Mods")) {
|
if (-not($rimworldMods -like "*Mods")) {
|
||||||
Write-Host "[Error] Place this program in the Mods folder of the RimWorld game" -ForegroundColor Red
|
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
|
||||||
Pause
|
|
||||||
exit
|
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..."
|
Write-Host "[INFO] Sending a request to google disk..."
|
||||||
@@ -27,7 +35,7 @@ if ($form) {
|
|||||||
$uriBuilder.Query = $queryString
|
$uriBuilder.Query = $queryString
|
||||||
$downloadUrl = $uriBuilder.Uri.AbsoluteUri
|
$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
|
Invoke-WebRequest -Uri $downloadUrl -WebSession $session -OutFile $outputFile
|
||||||
Write-Host "[INFO] The file was successfully downloaded with confirmation."
|
Write-Host "[INFO] The file was successfully downloaded with confirmation."
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user