Fix background Unity input and shop boundaries; record login failure
This commit is contained in:
+6
-1
@@ -11,7 +11,7 @@ from .engine import find_hits
|
|||||||
|
|
||||||
MAX_WAIT = 300.0
|
MAX_WAIT = 300.0
|
||||||
WAIT_INTERVAL = 1.0
|
WAIT_INTERVAL = 1.0
|
||||||
INPUT_TOOLS = {'click', 'click_text', 'click_image', 'keypress', 'type_text', 'drag'}
|
INPUT_TOOLS = {'click', 'click_text', 'click_image', 'keypress', 'type_text', 'drag', 'show_game_background'}
|
||||||
TASK_TOOLS = {'run_task', 'task_status', 'stop_task'}
|
TASK_TOOLS = {'run_task', 'task_status', 'stop_task'}
|
||||||
|
|
||||||
|
|
||||||
@@ -31,6 +31,8 @@ _IMG = {'name': {'type': 'string', 'description': 'AALC 模板图相对路径,
|
|||||||
'description': 'clam=只在模板原位置找, normal=扩大范围, aggressive=全屏'}}
|
'description': 'clam=只在模板原位置找, normal=扩大范围, aggressive=全屏'}}
|
||||||
|
|
||||||
TOOLS = [
|
TOOLS = [
|
||||||
|
{'name': 'show_game_background', 'description': '后台显示/恢复游戏窗口,使隐藏窗口继续渲染;不激活前台、不发送鼠标或键盘输入。',
|
||||||
|
'inputSchema': _obj()},
|
||||||
{'name': 'get_state', 'description': '截图 + OCR, 返回游戏窗口内全部文字(含坐标/置信度)。决策前先调这个, 不要猜坐标',
|
{'name': 'get_state', 'description': '截图 + OCR, 返回游戏窗口内全部文字(含坐标/置信度)。决策前先调这个, 不要猜坐标',
|
||||||
'inputSchema': _obj()},
|
'inputSchema': _obj()},
|
||||||
{'name': 'click_text', 'description': '按文字点击: OCR 定位后点中心。子串匹配、忽略空格, 完全相同的优先; index 选第几个命中',
|
{'name': 'click_text', 'description': '按文字点击: OCR 定位后点中心。子串匹配、忽略空格, 完全相同的优先; index 选第几个命中',
|
||||||
@@ -146,6 +148,9 @@ class Server:
|
|||||||
return {'ok': False, 'error': 'AALC 任务 %s 正在运行, 手动输入会打乱它; 先 stop_task' % self.tasks.info['task']}
|
return {'ok': False, 'error': 'AALC 任务 %s 正在运行, 手动输入会打乱它; 先 stop_task' % self.tasks.info['task']}
|
||||||
e = self.engine
|
e = self.engine
|
||||||
|
|
||||||
|
if name == 'show_game_background':
|
||||||
|
return dict(e.show_game_background(), ok=True)
|
||||||
|
|
||||||
if name == 'screenshot':
|
if name == 'screenshot':
|
||||||
return dict(e.screenshot(), ok=True)
|
return dict(e.screenshot(), ok=True)
|
||||||
if name == 'get_state':
|
if name == 'get_state':
|
||||||
|
|||||||
Reference in New Issue
Block a user