Skip to content

Commit

Permalink
Merge pull request #8 from trustnight/main
Browse files Browse the repository at this point in the history
茶憩再来一杯
  • Loading branch information
ok-oldking authored Jun 30, 2024
2 parents b456ea7 + da24e61 commit 542eff3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions task/DailyTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ def hecha(self):

def heyici(self):
diandan = self.wait_until(
condition=lambda: self.ocr(0.8, 0.7, 0.95, 0.83, match="开始点单") or
self.find_feature("hecha_chat",
condition = lambda: self.ocr(0.8, 0.83, 0.95, 0.95, match="再来一杯") or
self.ocr(0.8, 0.7, 0.95, 0.83, match="开始点单") or
self.find_feature("hecha_chat",
x=0.65, y=0.31,
to_x=0.93,
to_y=0.77,
Expand All @@ -126,7 +127,10 @@ def heyici(self):
if not diandan:
self.log_error("找不到开始点单")
raise Exception("找不到开始点单")
if diandan[0].name == '开始点单': # 如果是喝完直接跳过

if diandan[0].name == '再来一杯': # 如果是喝完直接跳过
self.click_box(diandan)
elif diandan[0].name == '开始点单': # 如果是喝完直接跳过
self.click_box(diandan)
while True:
next_step = self.wait_ocr(.76, .74, .9, .85, match=["下一步", "开始制作"], time_out=3)
Expand Down

0 comments on commit 542eff3

Please sign in to comment.