Fix: Rename keyword in assignment

This commit is contained in:
X-Zero-L 2023-12-27 13:22:35 +08:00
parent 3e4a528a5f
commit cde23a479e

View File

@ -63,21 +63,15 @@ class Assignment(AssignmentClaim, SynthesizeUI):
# Scheduler # Scheduler
logger.attr('has_new_dispatch', self.has_new_dispatch) logger.attr('has_new_dispatch', self.has_new_dispatch)
with self.config.multi_set(): with self.config.multi_set():
# Check battle pass
quests = self.config.stored.BattlePassTodayQuest.load_quests()
if self.has_new_dispatch:
if KEYWORD_BATTLE_PASS_QUEST.Dispatch_1_assignments in quests:
logger.info(
'Achieved battle pass quest Dispatch_1_assignments')
if self.config.stored.BattlePassLevel.is_full():
logger.info('BattlePassLevel full, no task call')
else:
self.config.task_call('BattlePass')
# Check daily # Check daily
quests = self.config.stored.DailyQuest.load_quests() quests = self.config.stored.DailyQuest.load_quests()
if KEYWORDS_DAILY_QUEST.Go_on_assignment_1_time in quests: if KEYWORDS_DAILY_QUEST.Go_on_assignment_1_time in quests:
logger.info('Achieved daily quest Go_on_assignment_1_time') logger.info('Achieved daily quest Go_on_assignment_1_time')
self.config.task_call('DailyQuest') self.config.task_call('DailyQuest')
if self.has_new_dispatch:
if KEYWORDS_DAILY_QUEST.Dispatch_1_assignments in quests:
logger.info('Achieved daily quest Dispatch_1_assignments')
self.config.task_call('DailyQuest')
# Delay self # Delay self
if len(self.dispatched): if len(self.dispatched):
delay = min(self.dispatched.values()) delay = min(self.dispatched.values())