This commit is contained in:
2022-10-17 12:02:47 +02:00
parent 6941b2667a
commit 433170b4c8
2 changed files with 4 additions and 4 deletions

View File

@@ -291,8 +291,8 @@ class Craft:
# initialize the StunVision class
vision_stun = Vision()
# odig_overlay = DiggingOverlay(config)
check_for_craft_button(capture_window2, vision_stun, capture_config)
# dig_overlay = DiggingOverlay(config)
check_for_craft_button(capture_window2, vision_stun)
check_for_craft_ok_button(capture_window2, vision_stun)
self.run_counter = self.run_counter + 1
self.overlay.update_status_label(self.mode + ": " + str(self.run_target - self.run_counter))

View File

@@ -176,7 +176,7 @@ def check_for_ok_button(cap_win, vis, conf):
def check_for_craft_button(cap_win, vis):
screenshot = cap_win.get_screenshot()
needle = cv.imread("play.jpg", cv.IMREAD_UNCHANGED)
needle = cv.imread("craft_table/play.jpg", cv.IMREAD_UNCHANGED)
rectangles = vis.find(screenshot, needle, 0.7, 1)
if len(rectangles) == 1:
pointis = vis.get_click_points(rectangles)
@@ -185,7 +185,7 @@ def check_for_craft_button(cap_win, vis):
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)
rectangles = vis.find(screenshot, cv.imread("craft_table/ok_button.jpg", cv.IMREAD_UNCHANGED), 0.5, 1)
offset_left = 0
offset_down = 0
if len(rectangles) == 1: