1
0
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:
positnuec
2026-08-16 17:05:31 +08:00
parent 602a35a660
commit 294c8a1f00
11 changed files with 32 additions and 20 deletions

View File

@@ -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()