diff --git a/campaign/event_20240425_cn/campaign_base.py b/campaign/event_20240425_cn/campaign_base.py index 03ca49532..5cbfbfd23 100644 --- a/campaign/event_20240425_cn/campaign_base.py +++ b/campaign/event_20240425_cn/campaign_base.py @@ -39,7 +39,7 @@ class CampaignBase(CampaignBase_): @staticmethod def _campaign_ocr_result_process(result): result = CampaignBase_._campaign_ocr_result_process(result) - if result in ['usp', 'iisp']: + if result in ['usp', 'iisp', 'ijsp']: result = 'sp' return result diff --git a/module/equipment/equipment_change.py b/module/equipment/equipment_change.py index 700c3b594..5f372913c 100644 --- a/module/equipment/equipment_change.py +++ b/module/equipment/equipment_change.py @@ -36,7 +36,19 @@ class EquipmentChange(Equipment): """ logger.info('RECORD EQUIPMENT') self.ship_side_navbar_ensure(bottom=1) + + # Ensure EQUIPMENT_GRID in the right place + skip_first_screenshot = True + while True: + if skip_first_screenshot: + skip_first_screenshot = False + else: + self.device.screenshot() + if self.appear(EQUIPMENT_OPEN): + break + self.equipment_list = {} + info_bar_disappeared = False for index, button in enumerate(EQUIPMENT_GRID.buttons): if index not in index_list: continue @@ -53,11 +65,18 @@ class EquipmentChange(Equipment): # Enter upgrade inform self.ui_click(click_button=UPGRADE_ENTER, check_button=UPGRADE_ENTER_CHECK, skip_first_screenshot=True) + # Save equipment template + if not info_bar_disappeared: + self.handle_info_bar() + info_bar_disappeared = True self.equipment_list[index] = self.image_crop(EQUIP_SAVE) # Quit upgrade inform self.ui_click( click_button=UPGRADE_QUIT, check_button=EQUIPMENT_OPEN, appear_button=UPGRADE_ENTER_CHECK, skip_first_screenshot=True) + else: + logger.info(f"Equipment {index} is empty") + logger.info(f"Recorded equipment index list: {list(self.equipment_list.keys())}") def ship_equipment_take_on_image(self, index_list=range(0, 5), skip_first_screenshot=True): diff --git a/module/map/map_operation.py b/module/map/map_operation.py index 82cf85301..f42abc9bb 100644 --- a/module/map/map_operation.py +++ b/module/map/map_operation.py @@ -266,6 +266,9 @@ class MapOperation(MysteryHandler, FleetPreparation, Retirement, FastForwardHand if not self.config.MAP_HAS_CLEAR_PERCENTAGE: logger.attr('MAP_HAS_CLEAR_PERCENTAGE', self.config.MAP_HAS_CLEAR_PERCENTAGE) return True + # info_bar covers percentage and MAP_GREEN + if self.info_bar_count(): + return False percent = self.get_map_clear_percentage() logger.attr('Map_clear_percentage', percent) diff --git a/module/notify/__init__.py b/module/notify/__init__.py new file mode 100644 index 000000000..58df2006e --- /dev/null +++ b/module/notify/__init__.py @@ -0,0 +1,4 @@ +def handle_notify(*args, **kwargs): + # Lazy import onepush + from module.notify.notify import handle_notify + return handle_notify(*args, **kwargs) diff --git a/module/notify.py b/module/notify/notify.py similarity index 100% rename from module/notify.py rename to module/notify/notify.py diff --git a/module/reward/reward.py b/module/reward/reward.py index dd4bde00e..fa8ca6fa3 100644 --- a/module/reward/reward.py +++ b/module/reward/reward.py @@ -66,8 +66,8 @@ class Reward(UI): both 'all' and 'weekly' pages Args: - interval (int): Configure the interval for - assets involved + interval (int, float): + Configure the interval for assets involved Returns: bool, if encountered at least 1 GET_ITEMS_* @@ -179,7 +179,7 @@ class Reward(UI): # Uses no interval to account for # behavior differences and avoid # premature exit - return self._reward_mission_collect(interval=0) + return self._reward_mission_collect(interval=0.2) def reward_mission(self, daily=True, weekly=True): """