-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplay_qrogue.ps1
40 lines (35 loc) · 1.28 KB
/
play_qrogue.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
param(
[Parameter(Mandatory=$false)] $DebugMode,
[Parameter(Mandatory=$false)] $TestLevel,
[Parameter(Mandatory=$false)] $Seed
)
$QROGUE_PATH = Split-Path -Path $MyInvocation.MyCommand.Path -Parent
$CONFIG_PATH = Join-Path -Path ${QROGUE_PATH} -ChildPath "qrogue\data\qrogue_launch.config"
$GAME_PATH = Join-Path -Path ${QROGUE_PATH} -ChildPath "main.py"
$config = Get-Content ${CONFIG_PATH}
# load powershell profile
#$profile_parent = Split-Path -Path $profile -Parent
#$qrogue_profile = Join-Path -ChildPath QrogueProfile.ps1 -Path ${profile_parent}
#. ${qrogue_profile}
# resize window
#$max_size = (Get-Host).UI.RawUI.MaxPhysicalWindowSize
#$new_size = (Get-Host).UI.RawUI.WindowSize
#$new_size.Width = 150
#$new_size.Height = 50
#IF ($new_size.Width -gt $max_size.Width)
#{
# $new_size.Width = $max_size.Width
#}
#IF ($new_size.Height -gt $max_size.Height)
#{
# $new_size.Height = $max_size.Height
#}
#
#(Get-Host).UI.RawUI.BufferSize = $new_size
#(Get-Host).UI.RawUI.WindowSize = $new_size
#Write-Host "New Window Size: " $new_size
# start game
$ENV_NAME = ${config} | Select-Object -First 1
Enter-CondaEnvironment ${ENV_NAME}
& python ${GAME_PATH} --from-console $DebugMode $TestLevel $Seed --user-data "D:\Documents\Studium\Master\3. Semester\Qrogue\QrogueData"
Exit-CondaEnvironment