updated mask on pixel level
This commit is contained in:
@@ -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,9 +110,12 @@ def run():
|
||||
elif keyboard.is_pressed('o') == True:
|
||||
pause = False
|
||||
print('o pressed')
|
||||
|
||||
if pause:
|
||||
# cv.waitKey(500)
|
||||
print("pausing")
|
||||
if (time() - loop_time_p) >= 5:
|
||||
loop_time_p = time()
|
||||
print("pausing")
|
||||
continue
|
||||
|
||||
try:
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user