Skip to content

Commit

Permalink
修改click_image未找到图片的处理
Browse files Browse the repository at this point in the history
  • Loading branch information
veadex committed Apr 27, 2024
1 parent a093632 commit aa9ffbd
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion autowsgr/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.2.28"
__version__ = "0.2.2.29"
2 changes: 1 addition & 1 deletion autowsgr/controller/emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def click_image(self, image, must_click=False, timeout=0, delay=0.5):
NotFoundErr: 如果在 timeout 时间内未找到则抛出该异常
"""
pos = self.wait_images_position(image, gap=0.03, timeout=timeout)
if pos == False:
if pos is None:
if must_click == False:
return False
else:
Expand Down
4 changes: 2 additions & 2 deletions autowsgr/data/default_ship_names.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,8 @@ No.406: # 哈曼
- "哈曼"
No.407: # 吕特晏斯
- "吕特晏斯"
No.408: # 肥鱼
- "肥鱼"
No.408: # 鲃鱼
- "鲃鱼"
No.409: # 新泽西
- "新泽西"
No.410: # 萨勒姆
Expand Down
4 changes: 2 additions & 2 deletions autowsgr/data/ocr/ship_name.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,8 @@ No.406: # 哈曼
- "哈曼"
No.407: # 吕特晏斯
- "吕特晏斯"
No.408: # 肥鱼
- "肥鱼"
No.408: # 鲃鱼
- "鲃鱼"
No.409: # 新泽西
- "新泽西"
No.410: # 萨勒姆
Expand Down
2 changes: 1 addition & 1 deletion autowsgr/fight/event/event_2024_0419.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _go_fight_prepare_page(self) -> None:
else:
self.timer.click_image(self.event_image[4], timeout=3) # 点击取消每日答题按钮

if not self.timer.image_exist(self.Info.event_image[1], need_screen_shot=0):
if not self.timer.image_exist(self.Info.event_image[1]):
self.timer.Android.click(*NODE_POSITION[self.map])

# 选择入口
Expand Down
4 changes: 2 additions & 2 deletions other_data/ship_name_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,8 @@ No.406: # 哈曼
- "哈曼"
No.407: # 吕特晏斯
- "吕特晏斯"
No.408: # 肥鱼
- "肥鱼"
No.408: # 鲃鱼
- "鲃鱼"
No.409: # 新泽西
- "新泽西"
No.410: # 萨勒姆
Expand Down
1 change: 0 additions & 1 deletion tools/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
1058: "奥希金斯",
1185: "机灵",
1408: "肥鱼",
408: "肥鱼",
}


Expand Down

0 comments on commit aa9ffbd

Please sign in to comment.