From cdcdd16118100764dadc836293c609eb76eb7c31 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sun, 28 Apr 2024 16:32:18 +0800 Subject: [PATCH 1/5] Fix: info_bar covers map clear percentage --- module/map/map_operation.py | 3 +++ 1 file changed, 3 insertions(+) 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) From 63fd8b63f6574137a0ec0840440cab951f4f40df Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sun, 28 Apr 2024 17:12:03 +0800 Subject: [PATCH 2/5] Opt: [ALAS] Lazy import onepush --- module/notify/__init__.py | 4 ++++ module/{ => notify}/notify.py | 0 2 files changed, 4 insertions(+) create mode 100644 module/notify/__init__.py rename module/{ => notify}/notify.py (100%) 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 From 03d99313db38ccb1f9e2a756f2f7bd1abb540716 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sun, 28 Apr 2024 17:33:50 +0800 Subject: [PATCH 3/5] Fix: OCR error on letter muse (fixed #3692) --- campaign/event_20240425_cn/campaign_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From b303d2279a5d7d0ca2100e11e77aa23e7951ccd3 Mon Sep 17 00:00:00 2001 From: Air111 <54128005+Air111@users.noreply.github.com> Date: Mon, 29 Apr 2024 00:43:39 +0800 Subject: [PATCH 4/5] Fix: equipment image record in fast PC (#3700) --- module/equipment/equipment_change.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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): From 30d4ffc644a0097ba33f6c9513aefacef6996db1 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Mon, 29 Apr 2024 00:45:40 +0800 Subject: [PATCH 5/5] Fix: _reward_mission_collect() calls should have minimum interval --- module/reward/reward.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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): """