mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
19 lines
691 B
PowerShell
19 lines
691 B
PowerShell
#########################################################
|
|
# Common functions for OpenRCT2 PowerShell scripts
|
|
#########################################################
|
|
$scriptsPath = Split-Path $Script:MyInvocation.MyCommand.Path
|
|
|
|
function Get-RootPath()
|
|
{
|
|
return Split-Path (Split-Path $scriptsPath)
|
|
}
|
|
|
|
function Prompt-User($message)
|
|
{
|
|
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Yes"
|
|
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "No"
|
|
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
|
|
$choice = $host.UI.PromptForChoice("", $message, $options, 1)
|
|
return ($choice -eq 0)
|
|
}
|