1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 09:48:20 +08:00

Opt: Early stop medal shop if having any item soldout

This commit is contained in:
LmeSzinc
2025-08-27 23:26:44 +08:00
parent e9f8a5d35a
commit a9bf935f41
2 changed files with 18 additions and 3 deletions

View File

@@ -101,6 +101,15 @@ class ShopItemGrid(ItemGrid):
class ShopItemGrid_250814(ShopItemGrid):
item_class = ShopItem_250814
def get_soldout_count(self, image):
count = 0
for button in self.grids.buttons:
item = self.item_class(image, button)
if not item.is_valid:
count += 1
logger.attr('Item soldout', count)
return count
class ShopBase(UI):
_currency = 0