ソースを参照

fix(Tako): ocr error #488

ryland 2 年 前
親
コミット
98466794b1
1 ファイル変更、5 行追加、0 行削除
  1. 5 0
      tasks/Component/GeneralRoom/general_room.py

+ 5 - 0
tasks/Component/GeneralRoom/general_room.py

@@ -133,6 +133,11 @@ class GeneralRoom(BaseTask, GeneralRoomAssets):
 
             if self.ocr_appear(self.O_GR_ZONES_NAME):
                 break
+            # https://github.com/runhey/OnmyojiAutoScript/issues/488
+            # 只能说朴实无华
+            text_ocr = self.O_GR_ZONES_NAME.ocr(self.device.image)
+            if name == '石距' and name in text_ocr:
+                break
             if click_timer.reached():
                 click_timer.reset()
                 self.device.click(x=pos[0] + randint(-5, 5), y=pos[1] + randint(-5, 5))