refactor dig

This commit is contained in:
2022-05-02 21:20:15 +02:00
parent 62dc818be1
commit dddfa60c77
2 changed files with 7 additions and 15 deletions

View File

@@ -36,20 +36,12 @@ def run():
continue continue
if level == 3: if level == 3:
plot_size = 45
width = 30 width = 30
elif level == 5: if level == 17:
plot_size = 43 DIG_TIME = 1850
width = 28
elif level == 7: plot_size = plot_size - level
plot_size = 41
width = 26
elif level == 9:
plot_size = 39
elif level == 11:
plot_size = 37
else:
pass
p1 = int((config.returnDiggingWindowPos2()[0] / 2) + config.returnDiggingWindowPos2()[2]) p1 = int((config.returnDiggingWindowPos2()[0] / 2) + config.returnDiggingWindowPos2()[2])

View File

@@ -167,8 +167,8 @@ def dig_point(point1, point2, dig_time):
def check_for_ok_button(cap_win, vis, conf): def check_for_ok_button(cap_win, vis, conf):
screenshot = cap_win.get_screenshot() screenshot = cap_win.get_screenshot()
rectangles = vis.find(screenshot, cv.imread("dig/ok_button.jpg", cv.IMREAD_UNCHANGED), 0.5, 1) rectangles = vis.find(screenshot, cv.imread("dig/ok_button.jpg", cv.IMREAD_UNCHANGED), 0.5, 1)
offset_left = conf.returnDiggingWindowPos2()[2] offset_left = conf.returnOKWindowPos()[2]
offset_down = conf.returnDiggingWindowPos2()[3] offset_down = conf.returnOKWindowPos()[3]
if len(rectangles) == 1: if len(rectangles) == 1:
pointis = vis.get_click_points(rectangles) pointis = vis.get_click_points(rectangles)
for pointi in pointis: for pointi in pointis: