1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-13 04:27:00 +08:00

Refactor: Use numpy image cache instead of pillow image

This commit is contained in:
LmeSzinc
2022-01-23 15:50:15 +08:00
parent 6df7684a37
commit 65f166ad12
51 changed files with 286 additions and 228 deletions

View File

@@ -56,7 +56,7 @@ class AmbushHandler(Combat):
self.wait_until_appear_then_click(MAP_AMBUSH_EVADE)
self.wait_until_appear(INFO_BAR_1)
image = info_letter_preprocess(np.array(self.image_area(INFO_BAR_DETECT)))
image = info_letter_preprocess(np.array(self.image_crop(INFO_BAR_DETECT)))
if TEMPLATE_AMBUSH_EVADE_SUCCESS.match(image):
logger.attr('Ambush_evade', 'success')
@@ -120,7 +120,7 @@ class AmbushHandler(Combat):
return False
_ = self._load_walk_template
image = info_letter_preprocess(np.array(self.image_area(INFO_BAR_DETECT)))
image = info_letter_preprocess(np.array(self.image_crop(INFO_BAR_DETECT)))
if TEMPLATE_MAP_WALK_OUT_OF_STEP.match(image):
logger.warning('Map walk out of step.')
self.handle_info_bar()