pyscreeps-arena 0.5.7b0__py3-none-any.whl → 0.5.7.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,10 @@ def CMD_NewProject():
27
27
  def CMD_OpenUI():
28
28
  """
29
29
  cmd:
30
- psaui
30
+ psaui 无参数,启用project ui
31
+ psaui -c/-e 启用creeplogic edit
32
+ psaui -m [-c/-e] 启用mapviewer. 默认cn,可以指定-c/-e
33
+ psaui -h 显示帮助信息
31
34
 
32
35
  * 打开UI界面
33
36
 
@@ -35,10 +38,39 @@ def CMD_OpenUI():
35
38
 
36
39
  """
37
40
  try:
38
- # 检查是否带 -c
39
- if len(sys.argv) > 1 and sys.argv[1] == '-c':
41
+ # 显示帮助信息
42
+ if len(sys.argv) > 1 and sys.argv[1] == '-h':
43
+ print("Usage:")
44
+ print(" psaui 启用project ui")
45
+ print(" psaui -c/-e 启用creeplogic edit (-c: 中文, -e: 英文)")
46
+ print(" psaui -m [-c/-e] 启用mapviewer (-c: 中文, -e: 英文, 默认: 中文)")
47
+ print(" psaui -h 显示帮助信息")
48
+ print(" --------------------------------------------------------------")
49
+ print(" psaui run `project ui`")
50
+ print(" psaui -c/-e run `creeplogic edit` (-c: chinese, -e: english)")
51
+ print(" psaui -m [-c/-e] run `mapviewer` (-c: chinese, -e: english, default: chinese)")
52
+ print(" psaui -h Show this help message")
53
+
54
+ return
55
+
56
+ # 检查是否使用mapviewer
57
+ if len(sys.argv) > 1 and sys.argv[1] == '-m':
58
+ from pyscreeps_arena.ui.mapviewer import run_mapviewer
59
+ # 检查语言参数
60
+ if len(sys.argv) > 2 and sys.argv[2] == '-e':
61
+ from pyscreeps_arena.core import config
62
+ config.language = 'en'
63
+ run_mapviewer()
64
+ # 检查是否使用creeplogic edit
65
+ elif len(sys.argv) > 1 and sys.argv[1] == '-c':
66
+ from pyscreeps_arena.ui.creeplogic_edit import run_creeplogic_edit
67
+ run_creeplogic_edit()
68
+ elif len(sys.argv) > 1 and sys.argv[1] == '-e':
40
69
  from pyscreeps_arena.ui.creeplogic_edit import run_creeplogic_edit
70
+ from pyscreeps_arena.core import config
71
+ config.language = 'en'
41
72
  run_creeplogic_edit()
73
+ # 默认启用project ui
42
74
  else:
43
75
  from pyscreeps_arena.ui.project_ui import run_project_creator
44
76
  run_project_creator()
@@ -9,7 +9,7 @@
9
9
  #
10
10
  import re
11
11
 
12
- VERSION = "0.5.7a"
12
+ VERSION = "0.5.7.2"
13
13
  AUTHOR = "●ω<🤍♪"
14
14
  STEAM_ID = "1029562896"
15
15
  GITHUB_NAME = "EagleBaby"
Binary file
@@ -6,5 +6,7 @@ PyScreeps Arena UI模块
6
6
  from .rs_icon import get_icon, get_pixmap
7
7
  from .project_ui import ProjectCreatorUI, run_project_creator
8
8
  from .P2PY import png_to_py
9
+ from .qmapv import QPSAMapViewer, CellInfo
9
10
 
10
- __all__ = ['get_icon', 'get_pixmap', 'ProjectCreatorUI', 'run_project_creator', 'png_to_py']
11
+ __all__ = ['get_icon', 'get_pixmap', 'ProjectCreatorUI', 'run_project_creator',
12
+ 'png_to_py', 'QPSAMapViewer', 'CellInfo']