1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 03:58:22 +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

@@ -176,7 +176,7 @@ class OSFleet(OSCamera, Combat, Fleet, OSAsh):
"""
super().hp_get()
ship_icon = self._hp_grid().crop((0, -67, 67, 0))
need_repair = [TEMPLATE_EMPTY_HP.match(self.image_crop(button)) for button in ship_icon.buttons]
need_repair = [TEMPLATE_EMPTY_HP.match(self.image_crop(button, copy=False)) for button in ship_icon.buttons]
self.need_repair = need_repair
logger.attr('Repair icon', need_repair)