mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-08-17 04:18:53 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import typing as t
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from module.base.decorator import cached_property
|
||||
import module.config.server as server
|
||||
from module.base.timer import Timer
|
||||
from module.config.config import Function
|
||||
@@ -38,8 +39,7 @@ class OSStatus(UI):
|
||||
|
||||
@property
|
||||
def cl1_enough_yellow_coins(self) -> bool:
|
||||
return self.get_yellow_coins() >= self.config.cross_get(
|
||||
keys='OpsiHazard1Leveling.OpsiHazard1Leveling.OperationCoinsPreserve')
|
||||
return self.get_yellow_coins() >= self.yellow_coins_preserve
|
||||
|
||||
@property
|
||||
def nearest_task_cooling_down(self) -> t.Optional[Function]:
|
||||
@@ -66,6 +66,17 @@ class OSStatus(UI):
|
||||
tasks = SelectedGrids(self.config.pending_task + self.config.waiting_task).filter(func).sort('next_run')
|
||||
return tasks.first_or_none()
|
||||
|
||||
@property
|
||||
def bought_all_yellow_coin_items_in_port_shop(self) -> bool:
|
||||
return self.config.cross_get("OpsiShop.Storage.Storage.BoughtAllYellowCoinItems", False)
|
||||
|
||||
@cached_property
|
||||
def yellow_coins_preserve(self):
|
||||
if self.is_cl1_enabled and not self.bought_all_yellow_coin_items_in_port_shop:
|
||||
return self.config.cross_get(keys='OpsiHazard1Leveling.OpsiHazard1Leveling.OperationCoinsPreserve')
|
||||
else:
|
||||
return self.config.OS_NORMAL_YELLOW_COINS_PRESERVE
|
||||
|
||||
def get_yellow_coins(self) -> int:
|
||||
yellow_coins = 0
|
||||
timeout = Timer(2, count=3).start()
|
||||
|
||||
Reference in New Issue
Block a user