diff --git a/assets/cn/dorm/DORM_QUICK_COLLECT.png b/assets/cn/dorm/DORM_QUICK_COLLECT.png new file mode 100644 index 000000000..d79b7a4c0 Binary files /dev/null and b/assets/cn/dorm/DORM_QUICK_COLLECT.png differ diff --git a/assets/cn/retire/RETIRE_SETTING_1.png b/assets/cn/retire/RETIRE_SETTING_1.png index b7919c2f5..57bc5470e 100644 Binary files a/assets/cn/retire/RETIRE_SETTING_1.png and b/assets/cn/retire/RETIRE_SETTING_1.png differ diff --git a/assets/cn/retire/RETIRE_SETTING_2.png b/assets/cn/retire/RETIRE_SETTING_2.png index f53975a97..d900a4986 100644 Binary files a/assets/cn/retire/RETIRE_SETTING_2.png and b/assets/cn/retire/RETIRE_SETTING_2.png differ diff --git a/assets/cn/retire/RETIRE_SETTING_3.png b/assets/cn/retire/RETIRE_SETTING_3.png index 82d3ead5b..279d497d3 100644 Binary files a/assets/cn/retire/RETIRE_SETTING_3.png and b/assets/cn/retire/RETIRE_SETTING_3.png differ diff --git a/assets/cn/retire/RETIRE_SETTING_4.png b/assets/cn/retire/RETIRE_SETTING_4.png index 108626e2e..712276585 100644 Binary files a/assets/cn/retire/RETIRE_SETTING_4.png and b/assets/cn/retire/RETIRE_SETTING_4.png differ diff --git a/assets/cn/retire/RETIRE_SETTING_5_ALL.png b/assets/cn/retire/RETIRE_SETTING_5_ALL.png index adc0d8c10..1387915c4 100644 Binary files a/assets/cn/retire/RETIRE_SETTING_5_ALL.png and b/assets/cn/retire/RETIRE_SETTING_5_ALL.png differ diff --git a/assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png b/assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png index 5de1e6a09..2ee7217a7 100644 Binary files a/assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png and b/assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png differ diff --git a/assets/cn/ui_white/MAIN_GOTO_MEMORIES_WHITE.png b/assets/cn/ui_white/MAIN_GOTO_MEMORIES_WHITE.png new file mode 100644 index 000000000..c3532152c Binary files /dev/null and b/assets/cn/ui_white/MAIN_GOTO_MEMORIES_WHITE.png differ diff --git a/assets/cn/ui_white/MAIN_TAB_SWITCH_WHITE.png b/assets/cn/ui_white/MAIN_TAB_SWITCH_WHITE.png new file mode 100644 index 000000000..02f72b7aa Binary files /dev/null and b/assets/cn/ui_white/MAIN_TAB_SWITCH_WHITE.png differ diff --git a/assets/en/dorm/DORM_QUICK_COLLECT.png b/assets/en/dorm/DORM_QUICK_COLLECT.png new file mode 100644 index 000000000..d79b7a4c0 Binary files /dev/null and b/assets/en/dorm/DORM_QUICK_COLLECT.png differ diff --git a/assets/en/retire/RETIRE_SETTING_1.png b/assets/en/retire/RETIRE_SETTING_1.png index f3a048388..607f6edc9 100644 Binary files a/assets/en/retire/RETIRE_SETTING_1.png and b/assets/en/retire/RETIRE_SETTING_1.png differ diff --git a/assets/en/retire/RETIRE_SETTING_2.png b/assets/en/retire/RETIRE_SETTING_2.png index fdfad7796..a628fa673 100644 Binary files a/assets/en/retire/RETIRE_SETTING_2.png and b/assets/en/retire/RETIRE_SETTING_2.png differ diff --git a/assets/en/retire/RETIRE_SETTING_3.png b/assets/en/retire/RETIRE_SETTING_3.png index 0b2e8334d..5a6b4e1e7 100644 Binary files a/assets/en/retire/RETIRE_SETTING_3.png and b/assets/en/retire/RETIRE_SETTING_3.png differ diff --git a/assets/en/retire/RETIRE_SETTING_4.png b/assets/en/retire/RETIRE_SETTING_4.png index 321988cb2..0e5d936c6 100644 Binary files a/assets/en/retire/RETIRE_SETTING_4.png and b/assets/en/retire/RETIRE_SETTING_4.png differ diff --git a/assets/en/retire/RETIRE_SETTING_5_ALL.png b/assets/en/retire/RETIRE_SETTING_5_ALL.png index 162182120..925d7658c 100644 Binary files a/assets/en/retire/RETIRE_SETTING_5_ALL.png and b/assets/en/retire/RETIRE_SETTING_5_ALL.png differ diff --git a/assets/en/retire/RETIRE_SETTING_5_PRESERVE.png b/assets/en/retire/RETIRE_SETTING_5_PRESERVE.png index 5955068be..12f593625 100644 Binary files a/assets/en/retire/RETIRE_SETTING_5_PRESERVE.png and b/assets/en/retire/RETIRE_SETTING_5_PRESERVE.png differ diff --git a/assets/en/ui_white/MAIN_GOTO_MEMORIES_WHITE.png b/assets/en/ui_white/MAIN_GOTO_MEMORIES_WHITE.png new file mode 100644 index 000000000..c3532152c Binary files /dev/null and b/assets/en/ui_white/MAIN_GOTO_MEMORIES_WHITE.png differ diff --git a/assets/en/ui_white/MAIN_TAB_SWITCH_WHITE.png b/assets/en/ui_white/MAIN_TAB_SWITCH_WHITE.png new file mode 100644 index 000000000..02f72b7aa Binary files /dev/null and b/assets/en/ui_white/MAIN_TAB_SWITCH_WHITE.png differ diff --git a/assets/jp/dorm/DORM_QUICK_COLLECT.png b/assets/jp/dorm/DORM_QUICK_COLLECT.png new file mode 100644 index 000000000..d79b7a4c0 Binary files /dev/null and b/assets/jp/dorm/DORM_QUICK_COLLECT.png differ diff --git a/assets/jp/retire/RETIRE_SETTING_1.png b/assets/jp/retire/RETIRE_SETTING_1.png new file mode 100644 index 000000000..9b7ffa4b5 Binary files /dev/null and b/assets/jp/retire/RETIRE_SETTING_1.png differ diff --git a/assets/jp/retire/RETIRE_SETTING_2.png b/assets/jp/retire/RETIRE_SETTING_2.png new file mode 100644 index 000000000..19b32773d Binary files /dev/null and b/assets/jp/retire/RETIRE_SETTING_2.png differ diff --git a/assets/jp/retire/RETIRE_SETTING_3.png b/assets/jp/retire/RETIRE_SETTING_3.png new file mode 100644 index 000000000..639079638 Binary files /dev/null and b/assets/jp/retire/RETIRE_SETTING_3.png differ diff --git a/assets/jp/retire/RETIRE_SETTING_4.png b/assets/jp/retire/RETIRE_SETTING_4.png new file mode 100644 index 000000000..2e70eaac6 Binary files /dev/null and b/assets/jp/retire/RETIRE_SETTING_4.png differ diff --git a/assets/jp/retire/RETIRE_SETTING_5_ALL.png b/assets/jp/retire/RETIRE_SETTING_5_ALL.png new file mode 100644 index 000000000..8f9cde051 Binary files /dev/null and b/assets/jp/retire/RETIRE_SETTING_5_ALL.png differ diff --git a/assets/jp/retire/RETIRE_SETTING_5_PRESERVE.png b/assets/jp/retire/RETIRE_SETTING_5_PRESERVE.png new file mode 100644 index 000000000..c86b16b73 Binary files /dev/null and b/assets/jp/retire/RETIRE_SETTING_5_PRESERVE.png differ diff --git a/assets/jp/ui_white/MAIN_GOTO_MEMORIES_WHITE.png b/assets/jp/ui_white/MAIN_GOTO_MEMORIES_WHITE.png new file mode 100644 index 000000000..c3532152c Binary files /dev/null and b/assets/jp/ui_white/MAIN_GOTO_MEMORIES_WHITE.png differ diff --git a/assets/jp/ui_white/MAIN_TAB_SWITCH_WHITE.png b/assets/jp/ui_white/MAIN_TAB_SWITCH_WHITE.png new file mode 100644 index 000000000..02f72b7aa Binary files /dev/null and b/assets/jp/ui_white/MAIN_TAB_SWITCH_WHITE.png differ diff --git a/assets/tw/dorm/DORM_QUICK_COLLECT.png b/assets/tw/dorm/DORM_QUICK_COLLECT.png new file mode 100644 index 000000000..d79b7a4c0 Binary files /dev/null and b/assets/tw/dorm/DORM_QUICK_COLLECT.png differ diff --git a/assets/tw/ui_white/MAIN_GOTO_MEMORIES_WHITE.png b/assets/tw/ui_white/MAIN_GOTO_MEMORIES_WHITE.png new file mode 100644 index 000000000..c3532152c Binary files /dev/null and b/assets/tw/ui_white/MAIN_GOTO_MEMORIES_WHITE.png differ diff --git a/assets/tw/ui_white/MAIN_TAB_SWITCH_WHITE.png b/assets/tw/ui_white/MAIN_TAB_SWITCH_WHITE.png new file mode 100644 index 000000000..02f72b7aa Binary files /dev/null and b/assets/tw/ui_white/MAIN_TAB_SWITCH_WHITE.png differ diff --git a/module/device/method/maatouch.py b/module/device/method/maatouch.py index 04f1d1aa1..eb015fad7 100644 --- a/module/device/method/maatouch.py +++ b/module/device/method/maatouch.py @@ -294,7 +294,7 @@ class MaaTouch(Connection): self._maatouch_stream.recv(0) # Wait until operations finished - start = time.time() + # start = time.time() socket_out = self._maatouch_stream.makefile() max_trial = 3 for n in range(3): diff --git a/module/device/method/nemu_ipc.py b/module/device/method/nemu_ipc.py index b79e1c322..b69cf9dd5 100644 --- a/module/device/method/nemu_ipc.py +++ b/module/device/method/nemu_ipc.py @@ -8,6 +8,7 @@ import cv2 import numpy as np from module.base.decorator import cached_property, del_cached_property, has_cached_property +from module.base.timer import Timer from module.base.utils import ensure_time from module.device.method.minitouch import insert_swipe, random_rectangle_point from module.device.method.utils import RETRY_TRIES, retry_sleep @@ -277,11 +278,12 @@ class NemuIpcImpl: def _ev(self): return asyncio.new_event_loop() - async def ev_run_async(self, func, *args, **kwargs): + async def ev_run_async(self, func, *args, timeout=0.15, **kwargs): """ Args: func: Sync function to call *args: + timeout: **kwargs: Raises: @@ -290,7 +292,7 @@ class NemuIpcImpl: func_wrapped = partial(func, *args, **kwargs) # Increased timeout for slow PCs # Default screenshot interval is 0.2s, so a 0.15s timeout would have a fast retry without extra time costs - result = await asyncio.wait_for(self._ev.run_in_executor(None, func_wrapped), timeout=0.15) + result = await asyncio.wait_for(self._ev.run_in_executor(None, func_wrapped), timeout=timeout) return result def ev_run_sync(self, func, *args, **kwargs): @@ -343,7 +345,7 @@ class NemuIpcImpl: self.height = height_ptr.contents.value @retry - def screenshot(self): + def screenshot(self, timeout=0.15): """ Returns: np.ndarray: Image array in RGBA color space @@ -361,7 +363,8 @@ class NemuIpcImpl: ret = self.ev_run_sync( self.lib.nemu_capture_display, - self.connect_id, self.display_id, length, width_ptr, height_ptr, pixels_pointer + self.connect_id, self.display_id, length, width_ptr, height_ptr, pixels_pointer, + timeout=timeout, ) if ret > 0: raise NemuIpcError('nemu_capture_display failed during screenshot()') @@ -439,6 +442,8 @@ def serial_to_id(serial: str): class NemuIpc(Platform): + _screenshot_interval = Timer(0.1) + @cached_property def nemu_ipc(self) -> NemuIpcImpl: """ @@ -494,7 +499,8 @@ class NemuIpc(Platform): logger.info('nemu_ipc released') def screenshot_nemu_ipc(self): - image = self.nemu_ipc.screenshot() + timeout = max(self._screenshot_interval.limit - 0.01, 0.15) + image = self.nemu_ipc.screenshot(timeout=timeout) image = cv2.cvtColor(image, cv2.COLOR_BGRA2BGR) cv2.flip(image, 0, dst=image) diff --git a/module/dorm/assets.py b/module/dorm/assets.py index 4464ace41..df177b24b 100644 --- a/module/dorm/assets.py +++ b/module/dorm/assets.py @@ -19,7 +19,8 @@ DORM_FURNITURE_SHOP_FIRST_SELECTED = Button(area={'cn': (239, 519, 273, 525), 'e DORM_FURNITURE_SHOP_QUIT = Button(area={'cn': (38, 34, 58, 63), 'en': (38, 34, 58, 63), 'jp': (38, 34, 58, 63), 'tw': (38, 34, 58, 63)}, color={'cn': (255, 241, 195), 'en': (255, 241, 195), 'jp': (255, 241, 195), 'tw': (255, 241, 195)}, button={'cn': (38, 34, 58, 63), 'en': (38, 34, 58, 63), 'jp': (38, 34, 58, 63), 'tw': (38, 34, 58, 63)}, file={'cn': './assets/cn/dorm/DORM_FURNITURE_SHOP_QUIT.png', 'en': './assets/en/dorm/DORM_FURNITURE_SHOP_QUIT.png', 'jp': './assets/jp/dorm/DORM_FURNITURE_SHOP_QUIT.png', 'tw': './assets/tw/dorm/DORM_FURNITURE_SHOP_QUIT.png'}) DORM_MANAGE = Button(area={'cn': (949, 600, 1005, 659), 'en': (949, 600, 1005, 659), 'jp': (949, 600, 1005, 659), 'tw': (949, 600, 1005, 659)}, color={'cn': (255, 245, 213), 'en': (255, 245, 213), 'jp': (255, 245, 213), 'tw': (255, 245, 213)}, button={'cn': (949, 600, 1005, 659), 'en': (949, 600, 1005, 659), 'jp': (949, 600, 1005, 659), 'tw': (949, 600, 1005, 659)}, file={'cn': './assets/cn/dorm/DORM_MANAGE.png', 'en': './assets/en/dorm/DORM_MANAGE.png', 'jp': './assets/jp/dorm/DORM_MANAGE.png', 'tw': './assets/tw/dorm/DORM_MANAGE.png'}) DORM_MANAGE_CHECK = Button(area={'cn': (1128, 116, 1150, 135), 'en': (1128, 116, 1150, 135), 'jp': (1128, 116, 1150, 135), 'tw': (1128, 116, 1150, 135)}, color={'cn': (173, 147, 77), 'en': (173, 147, 77), 'jp': (173, 147, 77), 'tw': (173, 147, 77)}, button={'cn': (1128, 116, 1150, 135), 'en': (1128, 116, 1150, 135), 'jp': (1128, 116, 1150, 135), 'tw': (1128, 116, 1150, 135)}, file={'cn': './assets/cn/dorm/DORM_MANAGE_CHECK.png', 'en': './assets/en/dorm/DORM_MANAGE_CHECK.png', 'jp': './assets/jp/dorm/DORM_MANAGE_CHECK.png', 'tw': './assets/tw/dorm/DORM_MANAGE_CHECK.png'}) -DORM_RED_DOT = Button(area={'cn': (528, 339, 543, 356), 'en': (528, 339, 543, 356), 'jp': (528, 339, 543, 356), 'tw': (734, 215, 767, 248)}, color={'cn': (214, 126, 114), 'en': (214, 126, 114), 'jp': (214, 126, 114), 'tw': (130, 89, 94)}, button={'cn': (528, 339, 543, 356), 'en': (528, 339, 543, 356), 'jp': (528, 339, 543, 356), 'tw': (734, 215, 767, 248)}, file={'cn': './assets/cn/dorm/DORM_RED_DOT.png', 'en': './assets/en/dorm/DORM_RED_DOT.png', 'jp': './assets/jp/dorm/DORM_RED_DOT.png', 'tw': './assets/tw/dorm/DORM_RED_DOT.png'}) +DORM_QUICK_COLLECT = Button(area={'cn': (1191, 497, 1251, 519), 'en': (1191, 497, 1251, 519), 'jp': (1191, 497, 1251, 519), 'tw': (1191, 497, 1251, 519)}, color={'cn': (243, 194, 138), 'en': (243, 194, 138), 'jp': (243, 194, 138), 'tw': (243, 194, 138)}, button={'cn': (1191, 497, 1251, 519), 'en': (1191, 497, 1251, 519), 'jp': (1191, 497, 1251, 519), 'tw': (1191, 497, 1251, 519)}, file={'cn': './assets/cn/dorm/DORM_QUICK_COLLECT.png', 'en': './assets/en/dorm/DORM_QUICK_COLLECT.png', 'jp': './assets/jp/dorm/DORM_QUICK_COLLECT.png', 'tw': './assets/tw/dorm/DORM_QUICK_COLLECT.png'}) +DORM_RED_DOT = Button(area={'cn': (528, 339, 543, 356), 'en': (528, 339, 543, 356), 'jp': (528, 339, 543, 356), 'tw': (528, 339, 543, 356)}, color={'cn': (214, 126, 114), 'en': (214, 126, 114), 'jp': (214, 126, 114), 'tw': (214, 126, 114)}, button={'cn': (528, 339, 543, 356), 'en': (528, 339, 543, 356), 'jp': (528, 339, 543, 356), 'tw': (528, 339, 543, 356)}, file={'cn': './assets/cn/dorm/DORM_RED_DOT.png', 'en': './assets/en/dorm/DORM_RED_DOT.png', 'jp': './assets/jp/dorm/DORM_RED_DOT.png', 'tw': './assets/tw/dorm/DORM_RED_DOT.png'}) OCR_DORM_FILL = Button(area={'cn': (813, 271, 987, 296), 'en': (813, 271, 987, 296), 'jp': (813, 271, 987, 296), 'tw': (813, 271, 987, 296)}, color={'cn': (222, 213, 193), 'en': (222, 213, 193), 'jp': (222, 213, 193), 'tw': (222, 213, 193)}, button={'cn': (813, 271, 987, 296), 'en': (813, 271, 987, 296), 'jp': (813, 271, 987, 296), 'tw': (813, 271, 987, 296)}, file={'cn': './assets/cn/dorm/OCR_DORM_FILL.png', 'en': './assets/en/dorm/OCR_DORM_FILL.png', 'jp': './assets/jp/dorm/OCR_DORM_FILL.png', 'tw': './assets/tw/dorm/OCR_DORM_FILL.png'}) OCR_DORM_FURNITURE_COIN = Button(area={'cn': (897, 20, 988, 49), 'en': (897, 20, 988, 49), 'jp': (897, 20, 988, 49), 'tw': (897, 20, 988, 49)}, color={'cn': (203, 197, 194), 'en': (203, 197, 194), 'jp': (203, 197, 194), 'tw': (203, 197, 194)}, button={'cn': (897, 20, 988, 49), 'en': (897, 20, 988, 49), 'jp': (897, 20, 988, 49), 'tw': (897, 20, 988, 49)}, file={'cn': './assets/cn/dorm/OCR_DORM_FURNITURE_COIN.png', 'en': './assets/en/dorm/OCR_DORM_FURNITURE_COIN.png', 'jp': './assets/jp/dorm/OCR_DORM_FURNITURE_COIN.png', 'tw': './assets/tw/dorm/OCR_DORM_FURNITURE_COIN.png'}) OCR_DORM_FURNITURE_PRICE = Button(area={'cn': (819, 417, 896, 442), 'en': (819, 417, 896, 442), 'jp': (819, 417, 896, 442), 'tw': (819, 417, 896, 442)}, color={'cn': (227, 223, 220), 'en': (227, 223, 220), 'jp': (227, 223, 220), 'tw': (227, 223, 220)}, button={'cn': (819, 417, 896, 442), 'en': (819, 417, 896, 442), 'jp': (819, 417, 896, 442), 'tw': (819, 417, 896, 442)}, file={'cn': './assets/cn/dorm/OCR_DORM_FURNITURE_PRICE.png', 'en': './assets/en/dorm/OCR_DORM_FURNITURE_PRICE.png', 'jp': './assets/jp/dorm/OCR_DORM_FURNITURE_PRICE.png', 'tw': './assets/tw/dorm/OCR_DORM_FURNITURE_PRICE.png'}) diff --git a/module/dorm/dorm.py b/module/dorm/dorm.py index d6ed2c228..52a616dc3 100644 --- a/module/dorm/dorm.py +++ b/module/dorm/dorm.py @@ -242,21 +242,20 @@ class RewardDorm(UI): def dorm_collect(self): """ - Click all coins and loves on current screen. - Zoom-out dorm to detect coins and loves, because swipes in dorm may treat as dragging ships. - Coordinates here doesn't matter too much. + Collect all the coins and loves in the dorm using the one-click collect button. Pages: - in: page_dorm, without info_bar - out: page_dorm, without info_bar + in: page_dorm + out: page_dorm """ logger.hr('Dorm collect') - self.dorm_view_reset() - - # Collect - _dorm_receive_attempt = 0 + self.ensure_no_info_bar() skip_first_screenshot = True + + # Set a timer to avoid Alas failing to detect the info_bar by accident. + timeout = Timer(1.5, count=3).start() + while 1: if skip_first_screenshot: skip_first_screenshot = False @@ -266,22 +265,18 @@ class RewardDorm(UI): # Handle all popups if self.ui_additional(): continue - if self.appear_then_click(DORM_FURNITURE_CONFIRM, offset=(30, 30), interval=3): + + # Collect coins and loves through the quick collect button + if self.appear_then_click(DORM_QUICK_COLLECT, offset=(20, 20), interval=1): continue - # DORM_CHECK on screen before attempt - # Stacked popup may fail detection as - # may be in progress of appearing - if not self.appear(DORM_CHECK): - continue + # Normal end + if self.info_bar_count() > 0: + break - # End - # - If max _dorm_receive_attempt (3+) reached - # - If _dorm_receive_click returns 0 (no coins/loves clicked) - if _dorm_receive_attempt < 3 and self._dorm_receive_click(): - self.ensure_no_info_bar() - _dorm_receive_attempt += 1 - else: + # Timeout end + if timeout.reached(): + logger.warning('Dorm collect timeout, probably because Alas did not detect the info_bar') break @cached_property diff --git a/module/os_shop/port_shop.py b/module/os_shop/port_shop.py index 94658fda0..b46fe2069 100644 --- a/module/os_shop/port_shop.py +++ b/module/os_shop/port_shop.py @@ -127,6 +127,7 @@ class PortShop(OSStatus, OSShopUI, Selector, MapEventHandler): self.device.click_record.clear() for i in range(4): + logger.hr(f'OpsiShop scan {i}') self.os_shop_side_navbar_ensure(upper=i + 1) pre_pos, cur_pos = self.init_slider() diff --git a/module/os_shop/shop.py b/module/os_shop/shop.py index ef741c9c2..7f338e17d 100644 --- a/module/os_shop/shop.py +++ b/module/os_shop/shop.py @@ -1,8 +1,9 @@ +from module.base.decorator import cached_property from module.config.utils import get_os_reset_remain from module.exception import ScriptError from module.logger import logger -from module.os_shop.assets import PORT_SUPPLY_CHECK, SHOP_BUY_CONFIRM from module.os_shop.akashi_shop import AkashiShop +from module.os_shop.assets import PORT_SUPPLY_CHECK, SHOP_BUY_CONFIRM from module.os_shop.port_shop import PortShop from module.os_shop.ui import OS_SHOP_SCROLL from module.shop.assets import AMOUNT_MAX, AMOUNT_MINUS, AMOUNT_PLUS, SHOP_BUY_CONFIRM_AMOUNT, SHOP_BUY_CONFIRM as OS_SHOP_BUY_CONFIRM @@ -50,6 +51,9 @@ class OSShop(PortShop, AkashiShop): self.interval_reset(SHOP_BUY_CONFIRM_AMOUNT) continue + if self.handle_popup_confirm('SHOP_BUY'): + continue + if not success and self.appear(PORT_SUPPLY_CHECK, offset=(20, 20), interval=5): self.device.click(button) continue @@ -139,6 +143,7 @@ class OSShop(PortShop, AkashiShop): items.reverse() count = 0 while len(items): + logger.hr('OpsiShop buy', level=2) item = items.pop() self.os_shop_get_coins() if item.price > self.get_currency_coins(item): @@ -175,14 +180,19 @@ class OSShop(PortShop, AkashiShop): self.os_shop_buy(select_func=self.os_shop_get_item_to_buy_in_akashi) self.ui_back(appear_button=PORT_SUPPLY_CHECK, check_button=self.is_in_map, skip_first_screenshot=True) + @cached_property + def yellow_coins_preserve(self): + if self.is_cl1_enabled: + return self.config.OS_CL1_YELLOW_COINS_PRESERVE + else: + return self.config.OS_NORMAL_YELLOW_COINS_PRESERVE + def get_currency_coins(self, item): if item.cost == 'YellowCoins': if get_os_reset_remain() == 0: return self._shop_yellow_coins - 100 - elif self.is_cl1_enabled: - return self._shop_yellow_coins - self.config.OS_CL1_YELLOW_COINS_PRESERVE else: - return self._shop_yellow_coins - self.config.OS_NORMAL_YELLOW_COINS_PRESERVE + return self._shop_yellow_coins - self.yellow_coins_preserve elif item.cost == 'PurpleCoins': if get_os_reset_remain() == 0: @@ -194,9 +204,6 @@ class OSShop(PortShop, AkashiShop): if get_os_reset_remain() == 0: return False else: - if self.is_cl1_enabled: - yellow = self._shop_yellow_coins < self.config.OS_CL1_YELLOW_COINS_PRESERVE - else: - yellow = self._shop_yellow_coins < self.config.OS_NORMAL_YELLOW_COINS_PRESERVE + yellow = self._shop_yellow_coins < self._shop_purple_coins purple = self._shop_purple_coins < self.config.OS_NORMAL_PURPLE_COINS_PRESERVE return yellow and purple diff --git a/module/retire/assets.py b/module/retire/assets.py index 9b6077540..04d7f85b4 100644 --- a/module/retire/assets.py +++ b/module/retire/assets.py @@ -28,12 +28,12 @@ RETIRE_APPEAR_1 = Button(area={'cn': (404, 501, 477, 532), 'en': (408, 497, 472, RETIRE_APPEAR_2 = Button(area={'cn': (604, 501, 677, 533), 'en': (585, 496, 694, 527), 'jp': (604, 497, 677, 529), 'tw': (603, 501, 677, 533)}, color={'cn': (146, 178, 219), 'en': (146, 179, 220), 'jp': (136, 171, 215), 'tw': (145, 177, 218)}, button={'cn': (604, 501, 677, 533), 'en': (585, 496, 694, 527), 'jp': (604, 497, 677, 529), 'tw': (603, 501, 677, 533)}, file={'cn': './assets/cn/retire/RETIRE_APPEAR_2.png', 'en': './assets/en/retire/RETIRE_APPEAR_2.png', 'jp': './assets/jp/retire/RETIRE_APPEAR_2.png', 'tw': './assets/tw/retire/RETIRE_APPEAR_2.png'}) RETIRE_APPEAR_3 = Button(area={'cn': (804, 501, 876, 533), 'en': (776, 496, 904, 521), 'jp': (804, 497, 876, 529), 'tw': (804, 501, 877, 533)}, color={'cn': (148, 179, 219), 'en': (155, 184, 222), 'jp': (136, 170, 214), 'tw': (147, 179, 219)}, button={'cn': (804, 501, 876, 533), 'en': (776, 496, 904, 521), 'jp': (804, 497, 876, 529), 'tw': (804, 501, 877, 533)}, file={'cn': './assets/cn/retire/RETIRE_APPEAR_3.png', 'en': './assets/en/retire/RETIRE_APPEAR_3.png', 'jp': './assets/jp/retire/RETIRE_APPEAR_3.png', 'tw': './assets/tw/retire/RETIRE_APPEAR_3.png'}) RETIRE_COIN = Button(area={'cn': (307, 638, 351, 661), 'en': (361, 638, 401, 661), 'jp': (326, 637, 365, 662), 'tw': (307, 638, 351, 661)}, color={'cn': (150, 158, 165), 'en': (152, 157, 165), 'jp': (173, 176, 182), 'tw': (150, 158, 165)}, button={'cn': (307, 638, 351, 661), 'en': (361, 638, 401, 661), 'jp': (326, 637, 365, 662), 'tw': (307, 638, 351, 661)}, file={'cn': './assets/cn/retire/RETIRE_COIN.png', 'en': './assets/en/retire/RETIRE_COIN.png', 'jp': './assets/jp/retire/RETIRE_COIN.png', 'tw': './assets/tw/retire/RETIRE_COIN.png'}) -RETIRE_SETTING_1 = Button(area={'cn': (819, 215, 846, 244), 'en': (817, 187, 849, 219), 'jp': (819, 215, 846, 244), 'tw': (819, 215, 846, 244)}, color={'cn': (110, 131, 156), 'en': (96, 115, 140), 'jp': (110, 131, 156), 'tw': (110, 131, 156)}, button={'cn': (819, 215, 846, 244), 'en': (817, 187, 849, 219), 'jp': (819, 215, 846, 244), 'tw': (819, 215, 846, 244)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_1.png', 'en': './assets/en/retire/RETIRE_SETTING_1.png', 'jp': './assets/cn/retire/RETIRE_SETTING_1.png', 'tw': './assets/cn/retire/RETIRE_SETTING_1.png'}) -RETIRE_SETTING_2 = Button(area={'cn': (747, 276, 775, 304), 'en': (745, 247, 777, 279), 'jp': (747, 276, 775, 304), 'tw': (747, 276, 775, 304)}, color={'cn': (109, 130, 155), 'en': (96, 114, 139), 'jp': (109, 130, 155), 'tw': (109, 130, 155)}, button={'cn': (747, 276, 775, 304), 'en': (745, 247, 777, 279), 'jp': (747, 276, 775, 304), 'tw': (747, 276, 775, 304)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_2.png', 'en': './assets/en/retire/RETIRE_SETTING_2.png', 'jp': './assets/cn/retire/RETIRE_SETTING_2.png', 'tw': './assets/cn/retire/RETIRE_SETTING_2.png'}) -RETIRE_SETTING_3 = Button(area={'cn': (894, 336, 923, 365), 'en': (893, 307, 925, 339), 'jp': (894, 336, 923, 365), 'tw': (894, 336, 923, 365)}, color={'cn': (105, 126, 151), 'en': (96, 115, 140), 'jp': (105, 126, 151), 'tw': (105, 126, 151)}, button={'cn': (894, 336, 923, 365), 'en': (893, 307, 925, 339), 'jp': (894, 336, 923, 365), 'tw': (894, 336, 923, 365)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_3.png', 'en': './assets/en/retire/RETIRE_SETTING_3.png', 'jp': './assets/cn/retire/RETIRE_SETTING_3.png', 'tw': './assets/cn/retire/RETIRE_SETTING_3.png'}) -RETIRE_SETTING_4 = Button(area={'cn': (970, 436, 997, 463), 'en': (969, 435, 998, 464), 'jp': (970, 436, 997, 463), 'tw': (970, 436, 997, 463)}, color={'cn': (105, 127, 154), 'en': (100, 121, 147), 'jp': (105, 127, 154), 'tw': (105, 127, 154)}, button={'cn': (970, 436, 997, 463), 'en': (969, 435, 998, 464), 'jp': (970, 436, 997, 463), 'tw': (970, 436, 997, 463)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_4.png', 'en': './assets/en/retire/RETIRE_SETTING_4.png', 'jp': './assets/cn/retire/RETIRE_SETTING_4.png', 'tw': './assets/cn/retire/RETIRE_SETTING_4.png'}) -RETIRE_SETTING_5_ALL = Button(area={'cn': (970, 537, 997, 563), 'en': (969, 436, 998, 465), 'jp': (970, 537, 997, 563), 'tw': (970, 537, 997, 563)}, color={'cn': (106, 128, 153), 'en': (100, 121, 147), 'jp': (106, 128, 153), 'tw': (106, 128, 153)}, button={'cn': (970, 537, 997, 563), 'en': (969, 436, 998, 465), 'jp': (970, 537, 997, 563), 'tw': (970, 537, 997, 563)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_5_ALL.png', 'en': './assets/en/retire/RETIRE_SETTING_5_ALL.png', 'jp': './assets/cn/retire/RETIRE_SETTING_5_ALL.png', 'tw': './assets/cn/retire/RETIRE_SETTING_5_ALL.png'}) -RETIRE_SETTING_5_PRESERVE = Button(area={'cn': (863, 538, 890, 563), 'en': (832, 562, 861, 591), 'jp': (863, 538, 890, 563), 'tw': (863, 538, 890, 563)}, color={'cn': (62, 70, 92), 'en': (60, 69, 91), 'jp': (62, 70, 92), 'tw': (62, 70, 92)}, button={'cn': (863, 538, 890, 563), 'en': (832, 562, 861, 591), 'jp': (863, 538, 890, 563), 'tw': (863, 538, 890, 563)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png', 'en': './assets/en/retire/RETIRE_SETTING_5_PRESERVE.png', 'jp': './assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png', 'tw': './assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png'}) +RETIRE_SETTING_1 = Button(area={'cn': (818, 259, 847, 290), 'en': (989, 260, 1017, 289), 'jp': (965, 265, 996, 296), 'tw': (818, 259, 847, 290)}, color={'cn': (102, 122, 147), 'en': (61, 71, 92), 'jp': (61, 70, 91), 'tw': (102, 122, 147)}, button={'cn': (818, 259, 847, 290), 'en': (989, 260, 1017, 289), 'jp': (965, 265, 996, 296), 'tw': (818, 259, 847, 290)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_1.png', 'en': './assets/en/retire/RETIRE_SETTING_1.png', 'jp': './assets/jp/retire/RETIRE_SETTING_1.png', 'tw': './assets/cn/retire/RETIRE_SETTING_1.png'}) +RETIRE_SETTING_2 = Button(area={'cn': (746, 316, 775, 346), 'en': (990, 317, 1017, 345), 'jp': (965, 325, 996, 356), 'tw': (746, 316, 775, 346)}, color={'cn': (104, 124, 149), 'en': (62, 73, 93), 'jp': (62, 73, 91), 'tw': (104, 124, 149)}, button={'cn': (746, 316, 775, 346), 'en': (990, 317, 1017, 345), 'jp': (965, 325, 996, 356), 'tw': (746, 316, 775, 346)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_2.png', 'en': './assets/en/retire/RETIRE_SETTING_2.png', 'jp': './assets/jp/retire/RETIRE_SETTING_2.png', 'tw': './assets/cn/retire/RETIRE_SETTING_2.png'}) +RETIRE_SETTING_3 = Button(area={'cn': (894, 372, 923, 404), 'en': (990, 374, 1017, 402), 'jp': (965, 385, 996, 416), 'tw': (894, 372, 923, 404)}, color={'cn': (101, 120, 145), 'en': (107, 129, 155), 'jp': (103, 121, 143), 'tw': (101, 120, 145)}, button={'cn': (894, 372, 923, 404), 'en': (990, 374, 1017, 402), 'jp': (965, 385, 996, 416), 'tw': (894, 372, 923, 404)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_3.png', 'en': './assets/en/retire/RETIRE_SETTING_3.png', 'jp': './assets/jp/retire/RETIRE_SETTING_3.png', 'tw': './assets/cn/retire/RETIRE_SETTING_3.png'}) +RETIRE_SETTING_4 = Button(area={'cn': (970, 471, 997, 498), 'en': (970, 471, 997, 498), 'jp': (967, 486, 995, 515), 'tw': (970, 471, 997, 498)}, color={'cn': (104, 125, 151), 'en': (104, 126, 153), 'jp': (61, 70, 91), 'tw': (104, 125, 151)}, button={'cn': (970, 471, 997, 498), 'en': (970, 471, 997, 498), 'jp': (967, 486, 995, 515), 'tw': (970, 471, 997, 498)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_4.png', 'en': './assets/en/retire/RETIRE_SETTING_4.png', 'jp': './assets/jp/retire/RETIRE_SETTING_4.png', 'tw': './assets/cn/retire/RETIRE_SETTING_4.png'}) +RETIRE_SETTING_5_ALL = Button(area={'cn': (969, 567, 997, 595), 'en': (969, 567, 997, 595), 'jp': (967, 586, 995, 615), 'tw': (969, 567, 997, 595)}, color={'cn': (66, 75, 92), 'en': (102, 123, 150), 'jp': (61, 70, 91), 'tw': (66, 75, 92)}, button={'cn': (969, 567, 997, 595), 'en': (969, 567, 997, 595), 'jp': (967, 586, 995, 615), 'tw': (969, 567, 997, 595)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_5_ALL.png', 'en': './assets/en/retire/RETIRE_SETTING_5_ALL.png', 'jp': './assets/jp/retire/RETIRE_SETTING_5_ALL.png', 'tw': './assets/cn/retire/RETIRE_SETTING_5_ALL.png'}) +RETIRE_SETTING_5_PRESERVE = Button(area={'cn': (863, 567, 890, 595), 'en': (836, 567, 863, 595), 'jp': (719, 586, 747, 615), 'tw': (863, 567, 890, 595)}, color={'cn': (103, 123, 149), 'en': (62, 72, 92), 'jp': (61, 70, 91), 'tw': (103, 123, 149)}, button={'cn': (863, 567, 890, 595), 'en': (836, 567, 863, 595), 'jp': (719, 586, 747, 615), 'tw': (863, 567, 890, 595)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png', 'en': './assets/en/retire/RETIRE_SETTING_5_PRESERVE.png', 'jp': './assets/jp/retire/RETIRE_SETTING_5_PRESERVE.png', 'tw': './assets/cn/retire/RETIRE_SETTING_5_PRESERVE.png'}) RETIRE_SETTING_ENTER = Button(area={'cn': (20, 501, 50, 531), 'en': (20, 501, 50, 531), 'jp': (20, 501, 50, 531), 'tw': (20, 501, 50, 531)}, color={'cn': (181, 181, 182), 'en': (181, 181, 182), 'jp': (181, 181, 182), 'tw': (181, 181, 182)}, button={'cn': (20, 501, 50, 531), 'en': (20, 501, 50, 531), 'jp': (20, 501, 50, 531), 'tw': (20, 501, 50, 531)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_ENTER.png', 'en': './assets/en/retire/RETIRE_SETTING_ENTER.png', 'jp': './assets/jp/retire/RETIRE_SETTING_ENTER.png', 'tw': './assets/tw/retire/RETIRE_SETTING_ENTER.png'}) RETIRE_SETTING_QUIT = Button(area={'cn': (986, 140, 1016, 169), 'en': (983, 113, 1019, 149), 'jp': (986, 140, 1016, 169), 'tw': (986, 140, 1016, 169)}, color={'cn': (224, 118, 113), 'en': (208, 99, 95), 'jp': (224, 118, 113), 'tw': (224, 118, 113)}, button={'cn': (986, 140, 1016, 169), 'en': (983, 113, 1019, 149), 'jp': (986, 140, 1016, 169), 'tw': (986, 140, 1016, 169)}, file={'cn': './assets/cn/retire/RETIRE_SETTING_QUIT.png', 'en': './assets/en/retire/RETIRE_SETTING_QUIT.png', 'jp': './assets/jp/retire/RETIRE_SETTING_QUIT.png', 'tw': './assets/tw/retire/RETIRE_SETTING_QUIT.png'}) SHIP_CONFIRM = Button(area={'cn': (1069, 641, 1241, 698), 'en': (1076, 644, 1235, 688), 'jp': (1069, 641, 1242, 697), 'tw': (1071, 641, 1241, 698)}, color={'cn': (84, 131, 190), 'en': (108, 147, 198), 'jp': (82, 128, 187), 'tw': (83, 130, 190)}, button={'cn': (1069, 641, 1241, 698), 'en': (1076, 644, 1235, 688), 'jp': (1069, 641, 1242, 697), 'tw': (1071, 641, 1241, 698)}, file={'cn': './assets/cn/retire/SHIP_CONFIRM.png', 'en': './assets/en/retire/SHIP_CONFIRM.png', 'jp': './assets/jp/retire/SHIP_CONFIRM.png', 'tw': './assets/tw/retire/SHIP_CONFIRM.png'}) diff --git a/module/retire/dock.py b/module/retire/dock.py index 2731179b7..91815c100 100644 --- a/module/retire/dock.py +++ b/module/retire/dock.py @@ -52,9 +52,10 @@ class Dock(Equipment): self.ui_click(DOCK_FILTER, appear_button=DOCK_CHECK, check_button=DOCK_FILTER_CONFIRM, skip_first_screenshot=True) - def dock_filter_confirm(self): + def dock_filter_confirm(self, wait_loading=True): self.ui_click(DOCK_FILTER_CONFIRM, check_button=DOCK_CHECK, skip_first_screenshot=True) - self.handle_dock_cards_loading() + if wait_loading: + self.handle_dock_cards_loading() @cached_property def dock_filter(self) -> Setting: @@ -102,7 +103,15 @@ class Dock(Equipment): ) return setting - def dock_filter_set(self, sort='level', index='all', faction='all', rarity='all', extra='no_limit'): + def dock_filter_set( + self, + sort='level', + index='all', + faction='all', + rarity='all', + extra='no_limit', + wait_loading=True + ): """ A faster filter set function. @@ -121,7 +130,7 @@ class Dock(Equipment): """ self.dock_filter_enter() self.dock_filter.set(sort=sort, index=index, faction=faction, rarity=rarity, extra=extra) - self.dock_filter_confirm() + self.dock_filter_confirm(wait_loading=wait_loading) def dock_select_one(self, button, skip_first_screenshot=True): """ diff --git a/module/retire/retirement.py b/module/retire/retirement.py index f107cfe0a..505144b64 100644 --- a/module/retire/retirement.py +++ b/module/retire/retirement.py @@ -160,12 +160,10 @@ class Retirement(Enhancement, QuickRetireSettingHandler): rarity.add('SSR') return rarity - def retire_ships_one_click(self, amount=None): + def retire_ships_one_click(self): logger.hr('Retirement') logger.info('Using one click retirement.') self.dock_favourite_set(False) - if amount is None: - amount = self._retire_amount end = False total = 0 @@ -206,8 +204,10 @@ class Retirement(Enhancement, QuickRetireSettingHandler): break self._retirement_confirm() total += 10 - if total >= amount: - break + # if total >= amount: + # break + # Always break, since game client retire all once + break logger.info(f'Total retired round: {total // 10}') return total @@ -321,7 +321,7 @@ class Retirement(Enhancement, QuickRetireSettingHandler): self._retirement_confirm() self._have_kept_cv = _ - self.dock_filter_set() + self.dock_filter_set(wait_loading=False) return total diff --git a/module/retire/setting.py b/module/retire/setting.py index 1799f49f2..48eea60df 100644 --- a/module/retire/setting.py +++ b/module/retire/setting.py @@ -95,4 +95,4 @@ class QuickRetireSettingHandler(UI): """ Fallback to the correct quick retire settings if user has wrong set. """ - return self.config.SERVER in ['cn', 'en'] + return self.config.SERVER in ['cn', 'en', 'jp'] diff --git a/module/ui/setting.py b/module/ui/setting.py index ad6eaa952..9be158735 100644 --- a/module/ui/setting.py +++ b/module/ui/setting.py @@ -122,7 +122,7 @@ class Setting: """ status = self._product_setting_status(**kwargs) - logger.info(f'Setting {self.name} options, {dict_to_kv(kwargs)}') + logger.info(f'Setting options {self.name}, {dict_to_kv(kwargs)}') skip_first_screenshot = True retry = Timer(1, count=2) timeout = Timer(10, count=20).start() diff --git a/module/ui/ui.py b/module/ui/ui.py index 127ea8e61..345453b87 100644 --- a/module/ui/ui.py +++ b/module/ui/ui.py @@ -542,6 +542,11 @@ class UI(InfoHandler): self.device.click(REWARD_GOTO_MAIN) self.get_interval_timer(IDLE).reset() return True + # Switch on ui_white, no offset just color match + if self.appear(MAIN_GOTO_MEMORIES_WHITE, interval=3): + logger.info(f'UI additional: {MAIN_GOTO_MEMORIES_WHITE} -> {MAIN_TAB_SWITCH_WHITE}') + self.device.click(MAIN_TAB_SWITCH_WHITE) + return True return False @@ -554,6 +559,8 @@ class UI(InfoHandler): """ if button == MEOWFFICER_GOTO_DORMMENU: self.interval_reset(GET_SHIP) + if button == DORMMENU_GOTO_DORM: + self.interval_reset(GET_SHIP) for switch_button in page_main.links.values(): if button == switch_button: self.interval_reset(GET_SHIP) diff --git a/module/ui_white/assets.py b/module/ui_white/assets.py index 87d7312ad..c9f792ab2 100644 --- a/module/ui_white/assets.py +++ b/module/ui_white/assets.py @@ -14,11 +14,13 @@ MAIN_GOTO_DORMMENU_WHITE = Button(area={'cn': (490, 656, 634, 702), 'en': (490, MAIN_GOTO_EVENT_LIST_WHITE = Button(area={'cn': (1181, 83, 1260, 160), 'en': (1179, 82, 1260, 161), 'jp': (1180, 83, 1261, 161), 'tw': (1179, 82, 1260, 161)}, color={'cn': (147, 155, 186), 'en': (148, 156, 184), 'jp': (146, 155, 186), 'tw': (185, 171, 160)}, button={'cn': (1181, 83, 1260, 160), 'en': (1179, 82, 1260, 161), 'jp': (1180, 83, 1261, 161), 'tw': (1179, 82, 1260, 161)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_EVENT_LIST_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_EVENT_LIST_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_EVENT_LIST_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_EVENT_LIST_WHITE.png'}) MAIN_GOTO_FLEET_WHITE = Button(area={'cn': (1025, 437, 1097, 579), 'en': (1024, 436, 1099, 580), 'jp': (1024, 437, 1099, 580), 'tw': (1024, 437, 1099, 580)}, color={'cn': (230, 229, 231), 'en': (218, 217, 218), 'jp': (235, 234, 236), 'tw': (232, 230, 233)}, button={'cn': (1025, 437, 1097, 579), 'en': (1024, 436, 1099, 580), 'jp': (1024, 437, 1099, 580), 'tw': (1024, 437, 1099, 580)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_FLEET_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_FLEET_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_FLEET_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_FLEET_WHITE.png'}) MAIN_GOTO_GUILD_WHITE = Button(area={'cn': (1116, 656, 1261, 703), 'en': (1115, 657, 1262, 703), 'jp': (1115, 658, 1261, 703), 'tw': (1116, 657, 1261, 703)}, color={'cn': (213, 206, 209), 'en': (217, 215, 216), 'jp': (212, 209, 207), 'tw': (211, 207, 213)}, button={'cn': (1116, 656, 1261, 703), 'en': (1115, 657, 1262, 703), 'jp': (1115, 658, 1261, 703), 'tw': (1116, 657, 1261, 703)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_GUILD_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_GUILD_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_GUILD_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_GUILD_WHITE.png'}) +MAIN_GOTO_MEMORIES_WHITE = Button(area={'cn': (1125, 546, 1195, 579), 'en': (1125, 546, 1195, 579), 'jp': (1125, 546, 1195, 579), 'tw': (1125, 546, 1195, 579)}, color={'cn': (255, 152, 191), 'en': (255, 152, 191), 'jp': (255, 152, 191), 'tw': (255, 152, 191)}, button={'cn': (1125, 546, 1195, 579), 'en': (1125, 546, 1195, 579), 'jp': (1125, 546, 1195, 579), 'tw': (1125, 546, 1195, 579)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_MEMORIES_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_MEMORIES_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_MEMORIES_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_MEMORIES_WHITE.png'}) MAIN_GOTO_MISSION_WHITE = Button(area={'cn': (802, 656, 949, 704), 'en': (803, 656, 948, 703), 'jp': (802, 657, 948, 703), 'tw': (803, 657, 948, 703)}, color={'cn': (219, 213, 214), 'en': (210, 207, 207), 'jp': (224, 216, 221), 'tw': (212, 211, 215)}, button={'cn': (802, 656, 949, 704), 'en': (803, 656, 948, 703), 'jp': (802, 657, 948, 703), 'tw': (803, 657, 948, 703)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_MISSION_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_MISSION_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_MISSION_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_MISSION_WHITE.png'}) MAIN_GOTO_RESHMENU_WHITE = Button(area={'cn': (646, 656, 793, 703), 'en': (646, 656, 792, 703), 'jp': (646, 657, 792, 703), 'tw': (646, 656, 792, 703)}, color={'cn': (216, 213, 217), 'en': (224, 224, 225), 'jp': (225, 222, 227), 'tw': (220, 216, 225)}, button={'cn': (646, 656, 793, 703), 'en': (646, 656, 792, 703), 'jp': (646, 657, 792, 703), 'tw': (646, 656, 792, 703)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_RESHMENU_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_RESHMENU_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_RESHMENU_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_RESHMENU_WHITE.png'}) MAIN_GOTO_REWARD_WHITE = Button(area={'cn': (11, 209, 30, 259), 'en': (11, 216, 31, 253), 'jp': (10, 216, 30, 253), 'tw': (10, 216, 31, 253)}, color={'cn': (73, 84, 122), 'en': (105, 115, 162), 'jp': (79, 82, 108), 'tw': (90, 96, 128)}, button={'cn': (11, 209, 30, 259), 'en': (11, 216, 31, 253), 'jp': (10, 216, 30, 253), 'tw': (10, 216, 31, 253)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_REWARD_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_REWARD_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_REWARD_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_REWARD_WHITE.png'}) MAIN_GOTO_SHOP_WHITE = Button(area={'cn': (18, 656, 164, 703), 'en': (18, 656, 165, 703), 'jp': (19, 657, 165, 702), 'tw': (19, 657, 164, 702)}, color={'cn': (221, 214, 212), 'en': (232, 220, 204), 'jp': (231, 223, 218), 'tw': (232, 224, 222)}, button={'cn': (18, 656, 164, 703), 'en': (18, 656, 165, 703), 'jp': (19, 657, 165, 702), 'tw': (19, 657, 164, 702)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_SHOP_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_SHOP_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_SHOP_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_SHOP_WHITE.png'}) MAIN_GOTO_STORAGE_WHITE = Button(area={'cn': (331, 656, 478, 703), 'en': (331, 657, 478, 703), 'jp': (332, 657, 478, 703), 'tw': (332, 657, 477, 702)}, color={'cn': (212, 214, 219), 'en': (214, 215, 216), 'jp': (220, 217, 223), 'tw': (216, 214, 217)}, button={'cn': (331, 656, 478, 703), 'en': (331, 657, 478, 703), 'jp': (332, 657, 478, 703), 'tw': (332, 657, 477, 702)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_STORAGE_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_STORAGE_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_STORAGE_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_STORAGE_WHITE.png'}) +MAIN_TAB_SWITCH_WHITE = Button(area={'cn': (966, 548, 999, 582), 'en': (966, 548, 999, 582), 'jp': (966, 548, 999, 582), 'tw': (966, 548, 999, 582)}, color={'cn': (89, 93, 108), 'en': (89, 93, 108), 'jp': (89, 93, 108), 'tw': (89, 93, 108)}, button={'cn': (966, 548, 999, 582), 'en': (966, 548, 999, 582), 'jp': (966, 548, 999, 582), 'tw': (966, 548, 999, 582)}, file={'cn': './assets/cn/ui_white/MAIN_TAB_SWITCH_WHITE.png', 'en': './assets/en/ui_white/MAIN_TAB_SWITCH_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_TAB_SWITCH_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_TAB_SWITCH_WHITE.png'}) MISSION_NOTICE_WHITE = Button(area={'cn': (923, 657, 947, 671), 'en': (923, 657, 947, 671), 'jp': (923, 657, 947, 671), 'tw': (923, 657, 947, 671)}, color={'cn': (227, 168, 159), 'en': (227, 168, 159), 'jp': (227, 168, 159), 'tw': (227, 168, 159)}, button={'cn': (923, 657, 947, 671), 'en': (923, 657, 947, 671), 'jp': (923, 657, 947, 671), 'tw': (923, 657, 947, 671)}, file={'cn': './assets/cn/ui_white/MISSION_NOTICE_WHITE.png', 'en': './assets/en/ui_white/MISSION_NOTICE_WHITE.png', 'jp': './assets/jp/ui_white/MISSION_NOTICE_WHITE.png', 'tw': './assets/tw/ui_white/MISSION_NOTICE_WHITE.png'}) POPUP_CANCEL_WHITE = Button(area={'cn': (487, 491, 531, 513), 'en': (487, 491, 531, 513), 'jp': (487, 491, 531, 513), 'tw': (487, 491, 531, 513)}, color={'cn': (214, 214, 214), 'en': (214, 214, 214), 'jp': (214, 214, 214), 'tw': (214, 214, 214)}, button={'cn': (487, 491, 531, 513), 'en': (487, 491, 531, 513), 'jp': (487, 491, 531, 513), 'tw': (487, 491, 531, 513)}, file={'cn': './assets/cn/ui_white/POPUP_CANCEL_WHITE.png', 'en': './assets/cn/ui_white/POPUP_CANCEL_WHITE.png', 'jp': './assets/cn/ui_white/POPUP_CANCEL_WHITE.png', 'tw': './assets/cn/ui_white/POPUP_CANCEL_WHITE.png'}) POPUP_CONFIRM_WHITE = Button(area={'cn': (746, 494, 791, 515), 'en': (746, 494, 791, 515), 'jp': (746, 494, 791, 515), 'tw': (746, 494, 791, 515)}, color={'cn': (133, 216, 255), 'en': (133, 216, 255), 'jp': (133, 216, 255), 'tw': (133, 216, 255)}, button={'cn': (746, 494, 791, 515), 'en': (746, 494, 791, 515), 'jp': (746, 494, 791, 515), 'tw': (746, 494, 791, 515)}, file={'cn': './assets/cn/ui_white/POPUP_CONFIRM_WHITE.png', 'en': './assets/cn/ui_white/POPUP_CONFIRM_WHITE.png', 'jp': './assets/cn/ui_white/POPUP_CONFIRM_WHITE.png', 'tw': './assets/cn/ui_white/POPUP_CONFIRM_WHITE.png'})