added pauses to loop management
This commit is contained in:
9
utils.py
9
utils.py
@@ -183,6 +183,15 @@ def check_for_craft_button(cap_win, vis, conf):
|
||||
for pointi in pointis:
|
||||
dig_point(pointi[0], pointi[1], 150)
|
||||
|
||||
def check_for_craft_ok_button(cap_win, vis):
|
||||
screenshot = cap_win.get_screenshot()
|
||||
rectangles = vis.find(screenshot, cv.imread("ok_button.jpg", cv.IMREAD_UNCHANGED), 0.5, 1)
|
||||
offset_left = 0
|
||||
offset_down = 0
|
||||
if len(rectangles) == 1:
|
||||
pointis = vis.get_click_points(rectangles)
|
||||
for pointi in pointis:
|
||||
dig_point(pointi[0] + offset_left, pointi[1] + offset_down, 150)
|
||||
|
||||
def get_click_point(rectangle):
|
||||
# Loop over all the rectangles
|
||||
|
||||
Reference in New Issue
Block a user