Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 07c9b2d

Browse files
committed
1.0.4.8.2
fixed pierce detection on hard toggle button fixed bug with pierce detection exclusion affecting packs
1 parent e3a3786 commit 07c9b2d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

sirsquirrel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
def update():
1717
r = requests.get("https://api.github.com/repos/Samsterr/SirSquirrelAssistant/releases/latest")
18-
tag = "1.0.4.7"
18+
tag = "1.0.4.8.2"
1919
r_tag = r.json()["tag_name"]
2020
if r_tag != tag:
2121
print("A New Version is Available! Downloading it to your current folder")

src/mirror.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,16 +255,16 @@ def pack_selection(self):
255255
self.logger.debug(common.luminence(x,y))
256256
refresh_flag = common.luminence(x,y) < 70
257257

258-
if floor == "f4" and common.element_exist("pictures/mirror/packs/f4/yield.png"):
259-
self.choose_pack("pictures/mirror/packs/f4/yield.png")
258+
#if floor == "f4" and common.element_exist("pictures/mirror/packs/f4/yield.png"):
259+
# self.choose_pack("pictures/mirror/packs/f4/yield.png")
260260

261261
#elif floor == "f5" and common.element_exist("pictures/mirror/packs/f5/yield.png"):
262262
# self.choose_pack("pictures/mirror/packs/f5/yield.png")
263263

264-
elif floor == "f5" and common.element_exist('pictures/mirror/packs/f5/lcb_check.png'):
265-
self.choose_pack('pictures/mirror/packs/f5/lcb_check.png')
264+
#elif floor == "f5" and common.element_exist('pictures/mirror/packs/f5/lcb_check.png'):
265+
# self.choose_pack('pictures/mirror/packs/f5/lcb_check.png')
266266

267-
elif self.exclusion_detection(floor) and not refresh_flag: #if pack exclusion detected and not refreshed
267+
if self.exclusion_detection(floor) and not refresh_flag: #if pack exclusion detected and not refreshed
268268
self.logger.info("Pack exclusion detected, refreshing")
269269
common.click_matching("pictures/mirror/general/refresh.png")
270270
common.mouse_move(200,200)
@@ -297,6 +297,8 @@ def pack_list(self,floor, threshold=0.8):
297297
def choose_pack(self,pack_image, threshold=0.8):
298298
found = common.match_image(pack_image,threshold)
299299
self.logger.debug(found)
300+
if pack_image == "pictures/mirror/packs/status/pierce_pack.png":
301+
found = [x for x in found if x[1] > common.scale_y(1092)] #Removes poor detections
300302
if common.element_exist("pictures/mirror/packs/status/owned.png"):
301303
owned_found = common.match_image("pictures/mirror/packs/status/owned.png")
302304
self.logger.debug(owned_found)
@@ -596,7 +598,7 @@ def rest_shop(self):
596598
self.logger.info("Restshop: Not enough Cost, Exiting")
597599
common.click_matching("pictures/mirror/restshop/leave.png")
598600
if not common.element_exist("pictures/general/confirm_w.png"):
599-
common.mouse_click(50,50)
601+
common.mouse_move_click(50,50)
600602
common.click_matching("pictures/mirror/restshop/leave.png")
601603
common.click_matching("pictures/general/confirm_w.png")
602604

@@ -671,7 +673,7 @@ def rest_shop(self):
671673
#LEAVING
672674
common.click_matching("pictures/mirror/restshop/leave.png")
673675
if not common.element_exist("pictures/general/confirm_w.png"):
674-
common.mouse_click(50,50)
676+
common.mouse_move_click(50,50)
675677
common.click_matching("pictures/mirror/restshop/leave.png")
676678
common.click_matching("pictures/general/confirm_w.png")
677679
return

0 commit comments

Comments
 (0)