This commit is contained in:
parent
aa841e6a05
commit
167f1da9f6
4 changed files with 36 additions and 34 deletions
BIN
mower/resources/skill_confirm.png
(Stored with Git LFS)
BIN
mower/resources/skill_confirm.png
(Stored with Git LFS)
Binary file not shown.
22
mower/solvers/infra/train/train_agent_choose.py
Normal file
22
mower/solvers/infra/train/train_agent_choose.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
from mower.solvers.infra.base_mixin import BaseMixin
|
||||
from mower.utils.solver import BaseSolver
|
||||
|
||||
|
||||
class TrainAgentChooseSolver(BaseSolver, BaseMixin):
|
||||
solver_name = "切换训练位干员"
|
||||
|
||||
def run(self, agent: str = ""):
|
||||
self.agent = agent
|
||||
super().run()
|
||||
|
||||
# def transition(self) -> bool:
|
||||
# if (scene := self.scene()) == Scene.INFRA_DETAILS:
|
||||
# if pos := self.find("arrange_check_in"):
|
||||
# self.ctap(pos, 3)
|
||||
# return
|
||||
# current = GetAgentFromRoomSolver()[1]["agent"]
|
||||
|
||||
|
||||
#
|
||||
# else:
|
||||
# EnterRoomSolver().run("train")
|
|
@ -309,6 +309,14 @@ class Recognizer:
|
|||
self.scene = Scene.AGREEMENT_UPDATE
|
||||
elif self.find("notice"):
|
||||
self.scene = Scene.NOTICE
|
||||
elif self.find("skill_collect_confirm"):
|
||||
self.scene = Scene.TRAIN_FINISH
|
||||
elif self.find("training_support"):
|
||||
self.scene = Scene.TRAIN_SKILL_SELECT
|
||||
elif self.find("upgrade_failure"):
|
||||
self.scene = Scene.TRAIN_SKILL_UPGRADE_ERROR
|
||||
elif self.find("skill_confirm"):
|
||||
self.scene = Scene.TRAIN_SKILL_UPGRADE
|
||||
elif self.find("sss/main"):
|
||||
self.scene = Scene.SSS_MAIN
|
||||
elif self.find("sss/start") or self.find("sss/start_ex"):
|
||||
|
@ -716,38 +724,6 @@ class Recognizer:
|
|||
self.check_loading_time()
|
||||
return self.scene
|
||||
|
||||
def get_train_scene(self) -> int:
|
||||
"""
|
||||
训练室场景识别
|
||||
"""
|
||||
# 场景缓存
|
||||
if self.scene != Scene.UNDEFINED:
|
||||
return self.scene
|
||||
# 连接中,优先级最高
|
||||
if self.find("connecting"):
|
||||
self.scene = Scene.CONNECTING
|
||||
elif self.find("infra_overview"):
|
||||
self.scene = Scene.INFRA_MAIN
|
||||
elif self.find("train_main"):
|
||||
self.scene = Scene.TRAIN_MAIN
|
||||
elif self.find("skill_collect_confirm", scope=((1142, 831), (1282, 932))):
|
||||
self.scene = Scene.TRAIN_FINISH
|
||||
elif self.find("training_support"):
|
||||
self.scene = Scene.TRAIN_SKILL_SELECT
|
||||
elif self.find("upgrade_failure"):
|
||||
self.scene = Scene.TRAIN_SKILL_UPGRADE_ERROR
|
||||
elif self.find("skill_confirm"):
|
||||
self.scene = Scene.TRAIN_SKILL_UPGRADE
|
||||
else:
|
||||
self.scene = Scene.UNKNOWN
|
||||
self.check_current_focus()
|
||||
|
||||
logger.debug(f"Scene: {self.scene}: {SceneComment[self.scene]}")
|
||||
|
||||
self.check_loading_time()
|
||||
|
||||
return self.scene
|
||||
|
||||
def find(
|
||||
self,
|
||||
res: tp.Res,
|
||||
|
|
|
@ -205,6 +205,7 @@ color = {
|
|||
"sign_in/special_access/banner": (391, 493),
|
||||
"sign_in/spring_festival/collect": (781, 953),
|
||||
"sign_in/spring_festival/receive": (834, 859),
|
||||
"skill_confirm": (1688, 899),
|
||||
"skip": (1803, 32),
|
||||
"sss/EC_up": (1049, 490),
|
||||
"sss/action": (1641, 967),
|
||||
|
@ -238,6 +239,7 @@ color = {
|
|||
"sss/switch_to_ex": (1255, 942),
|
||||
"sss/switch_to_normal": (1255, 934),
|
||||
"start_story": (1392, 623),
|
||||
"training_support": (116, 542),
|
||||
"vector/action_complete": (1280, 627),
|
||||
"vector/down": (152, 608),
|
||||
"vector/entry": (1479, 600),
|
||||
|
@ -487,6 +489,7 @@ template_matching = {
|
|||
"sign_in/spring_festival/login_day": ((1270, 160), (1460, 980)),
|
||||
"sign_in/task/banner": (645, 27),
|
||||
"sign_in/task/entry": (1682, 186),
|
||||
"skill_collect_confirm": (1164, 837),
|
||||
"sss/abandon": ((0, 504), (289, 564)),
|
||||
"sss/accomplished": (640, 381),
|
||||
"sss/drop/CASTER": ((0, 745), (1920, 808)),
|
||||
|
@ -514,6 +517,7 @@ template_matching = {
|
|||
"terminal/regular": (1083, 988),
|
||||
"terminal/score": (443, 988),
|
||||
"upgrade": (997, 501),
|
||||
"upgrade_failure": ((1419, 104), (1920, 235)),
|
||||
"user": (50, 452),
|
||||
"user_on": (51, 450),
|
||||
"visit_limit": ((1550, 100), (1920, 170)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue