mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-08-17 12:23:51 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from module.base.decorator import cached_property
|
||||
from module.base.timer import Timer
|
||||
from module.combat.assets import GET_ITEMS_1
|
||||
from module.config.utils import get_os_reset_remain
|
||||
@@ -212,11 +211,20 @@ class OSShop(PortShop, AkashiShop):
|
||||
items = self.scan_all()
|
||||
if not len(items):
|
||||
logger.warning('Empty OS shop.')
|
||||
self.config.cross_set("OpsiShop.Storage.Storage.BoughtAllYellowCoinItems", True)
|
||||
return False
|
||||
items = self.items_filter_in_os_shop(items)
|
||||
if not len(items):
|
||||
logger.warning('Nothing to buy.')
|
||||
return False
|
||||
self.config.cross_set("OpsiShop.Storage.Storage.BoughtAllYellowCoinItems", True)
|
||||
return False
|
||||
if all(item.cost == 'PurpleCoins' for item in items):
|
||||
logger.info("All yellow coin items are bought.")
|
||||
self.config.cross_set("OpsiShop.Storage.Storage.BoughtAllYellowCoinItems", True)
|
||||
else:
|
||||
logger.info("There are still yellow coin items to buy.")
|
||||
self.config.cross_set("OpsiShop.Storage.Storage.BoughtAllYellowCoinItems", False)
|
||||
self.os_shop_get_coins()
|
||||
skip_get_coins = True
|
||||
items.reverse()
|
||||
count = 0
|
||||
@@ -269,13 +277,6 @@ class OSShop(PortShop, AkashiShop):
|
||||
self.os_shop_buy(select_func=self.os_shop_get_item_to_buy_in_akashi)
|
||||
self.ui_back(appear_button=PORT_SUPPLY_CHECK, check_button=self.is_in_map, skip_first_screenshot=True)
|
||||
|
||||
@cached_property
|
||||
def yellow_coins_preserve(self):
|
||||
if self.is_cl1_enabled:
|
||||
return self.config.cross_get(keys='OpsiHazard1Leveling.OpsiHazard1Leveling.OperationCoinsPreserve')
|
||||
else:
|
||||
return self.config.OS_NORMAL_YELLOW_COINS_PRESERVE
|
||||
|
||||
def get_currency_coins(self, item):
|
||||
if item.cost == 'YellowCoins':
|
||||
if get_os_reset_remain() == 0:
|
||||
|
||||
Reference in New Issue
Block a user