mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-23 06:18:01 +08:00
Dev: Fix ITEM_GRIDS_3
This commit is contained in:
@@ -8,7 +8,7 @@ ITEM_GROUP = ItemGrid(None, {}, template_area=(40, 21, 89, 70), amount_area=(60,
|
|||||||
ITEM_GRIDS_1_ODD = ButtonGrid(origin=(336, 298), delta=(128, 0), button_shape=(96, 96), grid_shape=(5, 1))
|
ITEM_GRIDS_1_ODD = ButtonGrid(origin=(336, 298), delta=(128, 0), button_shape=(96, 96), grid_shape=(5, 1))
|
||||||
ITEM_GRIDS_1_EVEN = ButtonGrid(origin=(400, 298), delta=(128, 0), button_shape=(96, 96), grid_shape=(4, 1))
|
ITEM_GRIDS_1_EVEN = ButtonGrid(origin=(400, 298), delta=(128, 0), button_shape=(96, 96), grid_shape=(4, 1))
|
||||||
ITEM_GRIDS_2 = ButtonGrid(origin=(336, 227), delta=(128, 142), button_shape=(96, 96), grid_shape=(5, 2))
|
ITEM_GRIDS_2 = ButtonGrid(origin=(336, 227), delta=(128, 142), button_shape=(96, 96), grid_shape=(5, 2))
|
||||||
ITEM_GRIDS_3 = ButtonGrid(origin=(332, 227), delta=(128, 142), button_shape=(96, 96), grid_shape=(5, 2))
|
ITEM_GRIDS_3 = ButtonGrid(origin=(336, 223), delta=(128, 149), button_shape=(96, 96), grid_shape=(5, 2))
|
||||||
|
|
||||||
|
|
||||||
def merge_get_items(item_list_1, item_list_2):
|
def merge_get_items(item_list_1, item_list_2):
|
||||||
@@ -44,13 +44,15 @@ class GetItemsStatistics:
|
|||||||
ITEM_GROUP.grids = None
|
ITEM_GROUP.grids = None
|
||||||
if INFO_BAR_1.appear_on(image):
|
if INFO_BAR_1.appear_on(image):
|
||||||
raise ImageError('Stat image has info_bar')
|
raise ImageError('Stat image has info_bar')
|
||||||
elif GET_ITEMS_1.appear_on(image):
|
elif GET_ITEMS_1.match(image, offset=(5, 0)):
|
||||||
ITEM_GROUP.grids = ITEM_GRIDS_1_ODD if self._stats_get_items_is_odd(image) else ITEM_GRIDS_1_EVEN
|
ITEM_GROUP.grids = ITEM_GRIDS_1_ODD if self._stats_get_items_is_odd(image) else ITEM_GRIDS_1_EVEN
|
||||||
elif GET_ITEMS_2.appear_on(image):
|
elif GET_ITEMS_2.match(image, offset=(5, 0)):
|
||||||
ITEM_GROUP.grids = ITEM_GRIDS_2
|
ITEM_GROUP.grids = ITEM_GRIDS_2
|
||||||
elif GET_ITEMS_3.appear_on(image):
|
elif GET_ITEMS_3.match(image, offset=(5, 0)):
|
||||||
ITEM_GROUP.grids = ITEM_GRIDS_3
|
ITEM_GROUP.grids = ITEM_GRIDS_3
|
||||||
else:
|
else:
|
||||||
|
from PIL import Image
|
||||||
|
Image.fromarray(GET_ITEMS_1.image).show()
|
||||||
raise ImageError('Stat image is not a get_items image')
|
raise ImageError('Stat image is not a get_items image')
|
||||||
|
|
||||||
def stats_get_items(self, image):
|
def stats_get_items(self, image):
|
||||||
|
|||||||
Reference in New Issue
Block a user