mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-08-19 20:55:05 +08:00
Feat: migrate OpsiShop delay limit from absolute date to days before reset
This commit is contained in:
@@ -14,10 +14,10 @@ class OpsiShop(OSMap):
|
||||
If not having enough yellow coins or purple coins, skip buying supplies in next port.
|
||||
"""
|
||||
logger.hr('OS port daily', level=1)
|
||||
today = datetime.now().day
|
||||
limit = self.config.OpsiShop_DisableBeforeDate
|
||||
if today <= limit:
|
||||
logger.info(f'Delay Opsi shop, today\'s date {today} <= limit {limit}')
|
||||
remain = (get_os_next_reset().date() - datetime.now().date()).days
|
||||
limit = self.config.OpsiShop_DisableBeforeResetDays
|
||||
if limit > 0 and remain > limit:
|
||||
logger.info(f'Delay Opsi shop, reset remain {remain} days > limit {limit} days')
|
||||
self.config.task_delay(server_update=True)
|
||||
self.config.task_stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user