mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-28 05:29:42 +08:00
Opt: Move warning, print processed choice for run for record to look back on
This commit is contained in:
@@ -133,6 +133,7 @@ class RewardGuild(UI):
|
|||||||
# Cancel window, remove this choice since inapplicable, then choose again
|
# Cancel window, remove this choice since inapplicable, then choose again
|
||||||
self.handle_guild_cancel('GUILD_EXCHANGE', btn_guild_logistics_check)
|
self.handle_guild_cancel('GUILD_EXCHANGE', btn_guild_logistics_check)
|
||||||
choices.pop(key)
|
choices.pop(key)
|
||||||
|
logger.warning('Failed to exchange with any of the 3 available options')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _guild_exchange_priorities_helper(self, title, string_priority, default_priority):
|
def _guild_exchange_priorities_helper(self, title, string_priority, default_priority):
|
||||||
@@ -243,9 +244,11 @@ class RewardGuild(UI):
|
|||||||
if plate_name in plate_priority:
|
if plate_name in plate_priority:
|
||||||
plate_weight = plate_priority.index(plate_name)
|
plate_weight = plate_priority.index(plate_name)
|
||||||
|
|
||||||
# Did weight update? If so, then valid
|
# Did weight update?
|
||||||
# Otherwise, configure to skip by set absurd cost
|
# If not, then this choice given less priority
|
||||||
|
# also set to absurd cost to avoid using
|
||||||
if plate_weight == len(DEFAULT_PLATE_PRIORITY):
|
if plate_weight == len(DEFAULT_PLATE_PRIORITY):
|
||||||
|
item_weight = len(DEFAULT_ITEM_PRIORITY)
|
||||||
item_cost = 999999999
|
item_cost = 999999999
|
||||||
|
|
||||||
# Else normal item, check normally
|
# Else normal item, check normally
|
||||||
@@ -255,6 +258,7 @@ class RewardGuild(UI):
|
|||||||
item_cost = ITEM_TO_COST.get(option)
|
item_cost = ITEM_TO_COST.get(option)
|
||||||
|
|
||||||
choices[f'{i + 1}'] = [item_weight, plate_weight, i + 1, item_cost, btn]
|
choices[f'{i + 1}'] = [item_weight, plate_weight, i + 1, item_cost, btn]
|
||||||
|
logger.info(f'Choice #{i + 1} - Name: {option:15}, Weight: {item_weight}')
|
||||||
|
|
||||||
return choices
|
return choices
|
||||||
|
|
||||||
@@ -400,7 +404,6 @@ class RewardGuild(UI):
|
|||||||
options = self._guild_exchange_scan()
|
options = self._guild_exchange_scan()
|
||||||
choices = self._guild_exchange_check(options, item_priority, grade_to_plate_priorities)
|
choices = self._guild_exchange_check(options, item_priority, grade_to_plate_priorities)
|
||||||
if not self._guild_exchange_select(choices, btn_guild_logistics_check):
|
if not self._guild_exchange_select(choices, btn_guild_logistics_check):
|
||||||
logger.warning('Failed to exchange with any of the 3 available options')
|
|
||||||
break
|
break
|
||||||
self.ensure_no_info_bar()
|
self.ensure_no_info_bar()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user