1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-19 10:43:33 +08:00

Chore: Cleanup code and assets of old UI

This commit is contained in:
LmeSzinc
2025-10-09 21:12:33 +08:00
parent f5b92dae34
commit a1b9fffb16
33 changed files with 70 additions and 326 deletions

View File

@@ -1,14 +1,12 @@
from module.base.decorator import cached_property
from module.logger import logger
from module.ocr.ocr import Digit
from module.shop.assets import *
from module.shop.base import ShopItemGrid, ShopItemGrid_250814
from module.shop.clerk import ShopClerk
from module.shop.shop_status import ShopStatus
from module.shop.ui import ShopUI
class GeneralShop(ShopClerk, ShopUI, ShopStatus):
class GeneralShop_250814(ShopClerk, ShopUI, ShopStatus):
gems = 0
shop_template_folder = './assets/shop/general'
@@ -20,6 +18,7 @@ class GeneralShop(ShopClerk, ShopUI, ShopStatus):
"""
return self.config.GeneralShop_Filter.strip()
# New UI in 2025-08-14
@cached_property
def shop_general_items(self):
"""
@@ -27,7 +26,15 @@ class GeneralShop(ShopClerk, ShopUI, ShopStatus):
ShopItemGrid:
"""
shop_grid = self.shop_grid
shop_general_items = ShopItemGrid(shop_grid, templates={}, amount_area=(60, 74, 96, 95))
shop_general_items = ShopItemGrid_250814(
shop_grid,
templates={},
template_area=(25, 20, 82, 72),
amount_area=(42, 50, 65, 65),
cost_area=(-12, 115, 60, 155),
price_area=(14, 121, 85, 150),
)
shop_general_items.load_template_folder(self.shop_template_folder)
shop_general_items.load_cost_template_folder('./assets/shop/cost')
return shop_general_items
@@ -150,26 +157,3 @@ class GeneralShop(ShopClerk, ShopUI, ShopStatus):
if refresh and self.shop_refresh():
continue
break
class GeneralShop_250814(GeneralShop):
# New UI in 2025-08-14
@cached_property
def shop_general_items(self):
"""
Returns:
ShopItemGrid:
"""
shop_grid = self.shop_grid
shop_general_items = ShopItemGrid_250814(
shop_grid,
templates={},
template_area=(25, 20, 82, 72),
amount_area=(42, 50, 65, 65),
cost_area=(-12, 115, 60, 155),
price_area=(14, 121, 85, 150),
)
shop_general_items.load_template_folder(self.shop_template_folder)
shop_general_items.load_cost_template_folder('./assets/shop/cost')
return shop_general_items