diff --git a/module/config/config.py b/module/config/config.py index df399a6..f72779b 100644 --- a/module/config/config.py +++ b/module/config/config.py @@ -497,19 +497,18 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher def is_task_enabled(self, task): return bool(self.cross_get(keys=[task, 'Scheduler', 'Enable'], default=False)) - def update_daily_quests(self): - """ - Raises: - TaskEnd: Call task `DailyQuest` and stop current task - """ - if self.stored.DailyActivity.is_expired(): - logger.info('DailyActivity expired, call task to update') - self.task_call('DailyQuest') - self.task_stop() - if self.stored.DailyQuest.is_expired(): - logger.info('DailyQuest expired, call task to update') - self.task_call('DailyQuest') - self.task_stop() + # def update_daily_quests(self): + # """ + # Raises: + # TaskEnd: Call task `DailyQuest` and stop current task + # """ + # with self.multi_set(): + # if self.stored.DailyActivity.is_expired(): + # logger.info('DailyActivity expired') + # self.stored.DailyActivity.clear() + # if self.stored.DailyQuest.is_expired(): + # logger.info('DailyQuest expired') + # self.stored.DailyQuest.clear() @property def DEVICE_SCREENSHOT_METHOD(self): diff --git a/module/config/stored/classes.py b/module/config/stored/classes.py index 2bc8cc3..cff3d56 100644 --- a/module/config/stored/classes.py +++ b/module/config/stored/classes.py @@ -134,6 +134,9 @@ class StoredExpiredAtMonday0400(StoredBase): class StoredInt(StoredBase): value = 0 + def clear(self): + self.value = 0 + class StoredCounter(StoredBase): value = 0 @@ -148,6 +151,9 @@ class StoredCounter(StoredBase): self.value = value self.total = total + def clear(self): + self.value = 0 + def to_counter(self) -> str: return f'{self.value}/{self.total}'