refactor dig
This commit is contained in:
@@ -36,20 +36,12 @@ def run():
|
||||
continue
|
||||
|
||||
if level == 3:
|
||||
plot_size = 45
|
||||
width = 30
|
||||
elif level == 5:
|
||||
plot_size = 43
|
||||
width = 28
|
||||
elif level == 7:
|
||||
plot_size = 41
|
||||
width = 26
|
||||
elif level == 9:
|
||||
plot_size = 39
|
||||
elif level == 11:
|
||||
plot_size = 37
|
||||
else:
|
||||
pass
|
||||
if level == 17:
|
||||
DIG_TIME = 1850
|
||||
|
||||
plot_size = plot_size - level
|
||||
|
||||
|
||||
|
||||
p1 = int((config.returnDiggingWindowPos2()[0] / 2) + config.returnDiggingWindowPos2()[2])
|
||||
|
||||
4
utils.py
4
utils.py
@@ -167,8 +167,8 @@ def dig_point(point1, point2, dig_time):
|
||||
def check_for_ok_button(cap_win, vis, conf):
|
||||
screenshot = cap_win.get_screenshot()
|
||||
rectangles = vis.find(screenshot, cv.imread("dig/ok_button.jpg", cv.IMREAD_UNCHANGED), 0.5, 1)
|
||||
offset_left = conf.returnDiggingWindowPos2()[2]
|
||||
offset_down = conf.returnDiggingWindowPos2()[3]
|
||||
offset_left = conf.returnOKWindowPos()[2]
|
||||
offset_down = conf.returnOKWindowPos()[3]
|
||||
if len(rectangles) == 1:
|
||||
pointis = vis.get_click_points(rectangles)
|
||||
for pointi in pointis:
|
||||
|
||||
Reference in New Issue
Block a user