updated mask on pixel level

This commit is contained in:
2022-05-23 17:07:02 +02:00
parent 669607414e
commit 2930eb04b1

View File

@@ -101,6 +101,7 @@ def run():
k_needle = cv.imread("equip/keys/key_4_32.jpg", cv.IMREAD_UNCHANGED)
k_mask = cv.imread("equip/keys/key_4_32-mask.png", cv.IMREAD_COLOR)
dig_button = cv.imread("dig/ok_button.jpg", cv.IMREAD_UNCHANGED)
loop_time_p = time()
while True:
if keyboard.is_pressed('p') == True:
@@ -109,8 +110,11 @@ def run():
elif keyboard.is_pressed('o') == True:
pause = False
print('o pressed')
if pause:
# cv.waitKey(500)
if (time() - loop_time_p) >= 5:
loop_time_p = time()
print("pausing")
continue
@@ -276,11 +280,11 @@ def move_tile(conf, point_source, point_dest):
offset_down = conf.returnEquipmentWindowPos()[3]
pydirectinput.moveTo(point_source[0] + offset_left, point_source[1] + offset_down)
pydirectinput.mouseDown()
w = random.randint(1, 50)
w = random.randint(25, 50)
cv.waitKey(100 + w)
pydirectinput.moveTo(point_dest[0] + offset_left, point_dest[1] + offset_down)
pydirectinput.mouseUp()
cv.waitKey(500)
cv.waitKey(400 + w)
def find_emitter(emitter_to_use, vis, screen, layer):