1
0
mirror of https://github.com/sui-feng-cb/AzurLaneAutoScript1.git synced 2026-07-19 13:03:54 +08:00

Fix: handle_exp_info signature mismatch causing TypeError in auto_search

This commit is contained in:
positnuec
2026-07-12 08:48:57 +08:00
parent b3ccadf38e
commit 189645b97a
16 changed files with 32 additions and 32 deletions

View File

@@ -3,8 +3,8 @@ from module.ui.page import page_campaign
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background of Main Chapter 2 hits EXP_INFO_B
if self.ui_page_appear(page_campaign):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -4,8 +4,8 @@ from module.ui.page import page_campaign
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background of Main Chapter 3 hits EXP_INFO_B
if self.ui_page_appear(page_campaign):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -8,8 +8,8 @@ class CampaignBase(CampaignBase_):
self.config.MAP_SIREN_TEMPLATE = ['SS']
self.config.MAP_HAS_SIREN = True
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -3,8 +3,8 @@ from module.ui.page import page_event
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background of chapter A hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -13,8 +13,8 @@ class CampaignBase(CampaignBase_):
MAP_ENEMY_SEARCHING.color, get_color(self.device.image, MAP_ENEMY_SEARCHING.area)
) > self.MAP_ENEMY_SEARCHING_OVERLAY_TRANSPARENCY_THRESHOLD
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -3,11 +3,11 @@ from module.ui.page import page_event
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background of hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)
def map_data_init(self, map_):
super().map_data_init(map_)

View File

@@ -4,8 +4,8 @@ from module.campaign.campaign_base import CampaignBase as CampaignBase_
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -84,8 +84,8 @@ class CampaignBase(CampaignBase_):
return True
return super().handle_campaign_ui_additional()
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -40,8 +40,8 @@ class CampaignBase(CampaignBase_):
)
return super().campaign_set_chapter_20241219(*args, **kwargs)
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background of hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -5,11 +5,11 @@ from module.ui.page import page_campaign_menu, page_event
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background of hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)
def ui_goto_event(self):
if self.appear(EVENT_20250424_PT_ICON, offset=(20, 20)) and self.ui_page_appear(page_event):

View File

@@ -51,11 +51,11 @@ class CampaignBaseTS(CampaignBaseT):
return True
return super().campaign_set_chapter_20241219(chapter, stage, mode)
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Extra confirm button in chapter TS
if self.appear_then_click(ALCHEMIST_MATERIAL_CONFIRM, offset=(20, 20), interval=1):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)
def get_map_clear_percentage(self):
if AUTO_SEARCH.appear(main=self):

View File

@@ -4,8 +4,8 @@ from module.campaign.campaign_base import CampaignBase as CampaignBase_
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -8,8 +8,8 @@ class CampaignBase(CampaignBase_):
self.config.MAP_SIREN_TEMPLATE = ['SS']
self.config.MAP_HAS_SIREN = True
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -3,8 +3,8 @@ from module.ui.page import page_event
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background of chapter A hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -13,8 +13,8 @@ class CampaignBase(CampaignBase_):
MAP_ENEMY_SEARCHING.color, get_color(self.device.image, MAP_ENEMY_SEARCHING.area)
) > self.MAP_ENEMY_SEARCHING_OVERLAY_TRANSPARENCY_THRESHOLD
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)

View File

@@ -3,11 +3,11 @@ from module.ui.page import page_event
class CampaignBase(CampaignBase_):
def handle_exp_info(self):
def handle_exp_info(self, handle_fail=False):
# Random background of hits EXP_INFO_B
if self.ui_page_appear(page_event):
return False
return super().handle_exp_info()
return super().handle_exp_info(handle_fail=handle_fail)
def map_data_init(self, map_):
super().map_data_init(map_)