mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-26 02:25:03 +08:00
Fix: [JP] Larger medal icon in medal shop (#938)
This commit is contained in:
BIN
assets/shop/cost/Medal_3.png
Normal file
BIN
assets/shop/cost/Medal_3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
@@ -38,12 +38,14 @@ class MedalShop(ShopBase):
|
|||||||
"""
|
"""
|
||||||
shop_grid = self.shop_grid
|
shop_grid = self.shop_grid
|
||||||
shop_medal_items = ShopItemGrid(
|
shop_medal_items = ShopItemGrid(
|
||||||
shop_grid, templates={}, amount_area=(60, 74, 96, 95), price_area=(52, 135, 132, 162))
|
shop_grid,
|
||||||
|
templates={}, amount_area=(60, 74, 96, 95),
|
||||||
|
cost_area=(6, 123, 84, 175), price_area=(52, 135, 132, 162))
|
||||||
shop_medal_items.load_template_folder('./assets/shop/medal')
|
shop_medal_items.load_template_folder('./assets/shop/medal')
|
||||||
shop_medal_items.load_cost_template_folder('./assets/shop/cost')
|
shop_medal_items.load_cost_template_folder('./assets/shop/cost')
|
||||||
shop_medal_items.similarity = 0.88 # Lower the threshold for consistent matches of PR/DRBP
|
shop_medal_items.similarity = 0.88 # Lower the threshold for consistent matches of PR/DRBP
|
||||||
# JP has thinner letters, so increase threshold to 128
|
# JP has thinner letters, so increase threshold to 128
|
||||||
shop_medal_items.price_ocr = Digit([], letter=(255, 223, 57), threshold=128, name='PRICE_OCR_JP')
|
shop_medal_items.price_ocr = Digit([], letter=(255, 223, 57), threshold=128, name='PRICE_OCR')
|
||||||
return shop_medal_items
|
return shop_medal_items
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class Item:
|
|||||||
self.is_valid = self.predict_valid()
|
self.is_valid = self.predict_valid()
|
||||||
self._name = 'DefaultItem'
|
self._name = 'DefaultItem'
|
||||||
self.amount = 1
|
self.amount = 1
|
||||||
self.cost = 'DefaultCost'
|
self._cost = 'DefaultCost'
|
||||||
self.price = 0
|
self.price = 0
|
||||||
self.tag = None
|
self.tag = None
|
||||||
|
|
||||||
@@ -66,6 +66,18 @@ class Item:
|
|||||||
value = pre
|
value = pre
|
||||||
self._name = value
|
self._name = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cost(self):
|
||||||
|
return self._cost
|
||||||
|
|
||||||
|
@cost.setter
|
||||||
|
def cost(self, value):
|
||||||
|
if '_' in value:
|
||||||
|
pre, suffix = value.rsplit('_', 1)
|
||||||
|
if suffix.isdigit():
|
||||||
|
value = pre
|
||||||
|
self._cost = value
|
||||||
|
|
||||||
def is_known_item(self):
|
def is_known_item(self):
|
||||||
if self.name == 'DefaultItem':
|
if self.name == 'DefaultItem':
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user