1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 17:57:01 +08:00

Pref: Reuse image array to improve memory performance

This commit is contained in:
LmeSzinc
2024-06-05 00:20:31 +08:00
parent 77d48937fc
commit 58202c6a40
34 changed files with 61 additions and 58 deletions

View File

@@ -71,7 +71,7 @@ class AmbushHandler(Combat):
continue
# Handle evade success and failures
image = info_letter_preprocess(self.image_crop(INFO_BAR_DETECT))
image = info_letter_preprocess(self.image_crop(INFO_BAR_DETECT, copy=False))
if TEMPLATE_AMBUSH_EVADE_SUCCESS.match(image):
logger.attr('Ambush_evade', 'success')
elif TEMPLATE_AMBUSH_EVADE_FAILED.match(image):
@@ -140,7 +140,7 @@ class AmbushHandler(Combat):
if not self.info_bar_count():
return False
image = info_letter_preprocess(self.image_crop(INFO_BAR_DETECT))
image = info_letter_preprocess(self.image_crop(INFO_BAR_DETECT, copy=False))
if TEMPLATE_MAP_WALK_OUT_OF_STEP.match(image):
logger.warning('Map walk out of step.')
self.handle_info_bar()