1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-14 08:59:25 +08:00

Revert "tmp(need revert after upstream fixed): do not use skip_first_screenshot in StorageHandler.storage_checkout_item"

This reverts commit d4b307839b.
This commit is contained in:
0O0o0oOoO00
2026-01-23 17:45:51 +08:00
parent d4c3536af9
commit 89c4538f88

View File

@@ -252,36 +252,3 @@ class StorageHandler(GlobeOperation, ZoneManager):
result = self.storage_checkout_item(item)
return result
class StorageHandler(StorageHandler):
def storage_checkout_item(self, item):
"""
Args:
item (str): 'OBSCURE' or 'ABYSSAL'.
Returns:
bool: If checkout
Pages:
in: STORAGE_CHECK
out: is_in_map, in an obscure/abyssal zone if checkout.
is_in_map, in previous zone if no more obscure/abyssal coordinates.
"""
logger.hr(f'Storage checkout item {item}')
if SCROLL_STORAGE.appear(main=self):
SCROLL_STORAGE.set_top(main=self)
confirm_timer = Timer(0.6, count=2).start()
for _ in self.loop():
image = rgb2gray(self.device.image)
items = self._storage_item_to_template(item).match_multi(image, similarity=0.75)
logger.attr(f'Storage_{item}', len(items))
if len(items):
self._storage_coordinate_checkout(items[0], types=(item,))
return True
if confirm_timer.reached():
logger.info(f'No more {item} items in storage')
self.storage_quit()
return False