mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 20:49:26 +08:00
719 lines
27 KiB
Python
719 lines
27 KiB
Python
import collections
|
|
|
|
import module.config.server as server
|
|
|
|
import gl
|
|
from module.base import button
|
|
from module.base.button import ButtonGrid
|
|
from module.base.decorator import cached_property
|
|
from module.base.timer import Timer
|
|
from module.base.utils import ApiCollectionSwitch
|
|
from module.config.config import AzurLaneConfig
|
|
from module.device.device import Device
|
|
from module.equipment.assets import EQUIPMENT_OPEN
|
|
from module.logger import logger
|
|
from module.ocr.ocr import DigitCounter
|
|
from module.retire.assets import *
|
|
from module.storage.storage import StorageHandler
|
|
from module.ui.scroll import Scroll
|
|
from module.ui.setting import Setting
|
|
from module.ui.switch import Switch
|
|
from module.ui.ui import UI
|
|
from module.equipment.equipment import Equipment, EquipmentOld, EquipmentNew, SWIPE_DISTANCE
|
|
|
|
DOCK_SORTING = Switch('Dork_sorting')
|
|
DOCK_SORTING.add_state('Ascending', check_button=SORT_ASC, click_button=SORTING_CLICK)
|
|
DOCK_SORTING.add_state('Descending', check_button=SORT_DESC, click_button=SORTING_CLICK)
|
|
|
|
DOCK_FAVOURITE = Switch('Favourite_filter')
|
|
DOCK_FAVOURITE.add_state('on', check_button=COMMON_SHIP_FILTER_ENABLE)
|
|
DOCK_FAVOURITE.add_state('off', check_button=COMMON_SHIP_FILTER_DISABLE)
|
|
|
|
CARD_GRIDS = ButtonGrid(
|
|
origin=(93, 76), delta=(164 + 2 / 3, 227), button_shape=(138, 204), grid_shape=(7, 2), name='CARD')
|
|
CARD_RARITY_GRIDS = CARD_GRIDS.crop(area=(0, 0, 138, 5), name='RARITY')
|
|
if server.server != 'jp':
|
|
CARD_LEVEL_GRIDS = CARD_GRIDS.crop(area=(77, 5, 138, 27), name='LEVEL')
|
|
CARD_EMOTION_GRIDS = CARD_GRIDS.crop(area=(23, 29, 48, 52), name='EMOTION')
|
|
else:
|
|
CARD_LEVEL_GRIDS = CARD_GRIDS.crop(area=(74, 5, 136, 27), name='LEVEL')
|
|
CARD_EMOTION_GRIDS = CARD_GRIDS.crop(area=(21, 29, 71, 48), name='EMOTION')
|
|
|
|
DOCK_SCROLL = Scroll(DOCK_SCROLL, color=(247, 211, 66), name='DOCK_SCROLL')
|
|
|
|
OCR_DOCK_SELECTED = DigitCounter(DOCK_SELECTED, threshold=64, name='OCR_DOCK_SELECTED')
|
|
|
|
|
|
class DockOld(EquipmentOld):
|
|
def handle_dock_cards_loading(self):
|
|
# Poor implementation.
|
|
self.device.sleep((1, 1.5))
|
|
self.device.screenshot()
|
|
|
|
def dock_favourite_set(self, enable=False, wait_loading=True):
|
|
"""
|
|
Args:
|
|
enable: True to filter favourite ships only
|
|
wait_loading: Default to True, use False on continuous operation
|
|
"""
|
|
if DOCK_FAVOURITE.set('on' if enable else 'off', main=self):
|
|
if wait_loading:
|
|
self.handle_dock_cards_loading()
|
|
|
|
def _dock_quit_check_func(self):
|
|
return not self.appear(DOCK_CHECK, offset=(20, 20))
|
|
|
|
def dock_quit(self):
|
|
self.ui_back(check_button=self._dock_quit_check_func, skip_first_screenshot=True)
|
|
|
|
def dock_sort_method_dsc_set(self, enable=True, wait_loading=True):
|
|
"""
|
|
Args:
|
|
enable: True to set descending sorting
|
|
wait_loading: Default to True, use False on continuous operation
|
|
"""
|
|
if DOCK_SORTING.set('Descending' if enable else 'Ascending', main=self):
|
|
if wait_loading:
|
|
self.handle_dock_cards_loading()
|
|
|
|
def dock_filter_enter(self):
|
|
self.ui_click(DOCK_FILTER, appear_button=DOCK_CHECK, check_button=DOCK_FILTER_CONFIRM,
|
|
skip_first_screenshot=True)
|
|
|
|
def dock_filter_confirm(self, wait_loading=True):
|
|
"""
|
|
Args:
|
|
wait_loading: Default to True, use False on continuous operation
|
|
"""
|
|
self.ui_click(DOCK_FILTER_CONFIRM, check_button=DOCK_CHECK, skip_first_screenshot=True)
|
|
if wait_loading:
|
|
self.handle_dock_cards_loading()
|
|
|
|
@cached_property
|
|
def dock_filter(self) -> Setting:
|
|
delta = (147 + 1 / 3, 57)
|
|
button_shape = (139, 42)
|
|
setting = Setting(name='DOCK', main=self)
|
|
setting.add_setting(
|
|
setting='sort',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 65), delta=delta, button_shape=button_shape, grid_shape=(7, 1), name='FILTER_SORT'),
|
|
# stat has extra grid, not worth pursuing
|
|
option_names=['rarity', 'level', 'total', 'join', 'intimacy', 'mood', 'stat'],
|
|
option_default='level'
|
|
)
|
|
setting.add_setting(
|
|
setting='index',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 138), delta=delta, button_shape=button_shape, grid_shape=(7, 2), name='FILTER_INDEX'),
|
|
option_names=['all', 'vanguard', 'main', 'dd', 'cl', 'ca', 'bb',
|
|
'cv', 'repair', 'ss', 'others', 'not_available', 'not_available', 'not_available'],
|
|
option_default='all'
|
|
)
|
|
setting.add_setting(
|
|
setting='faction',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 268), delta=delta, button_shape=button_shape, grid_shape=(7, 2), name='FILTER_FACTION'),
|
|
option_names=['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon', 'sardegna',
|
|
'northern', 'iris', 'vichya', 'other', 'not_available', 'not_available', 'not_available'],
|
|
option_default='all'
|
|
)
|
|
setting.add_setting(
|
|
setting='rarity',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 398), delta=delta, button_shape=button_shape, grid_shape=(7, 1), name='FILTER_RARITY'),
|
|
option_names=['all', 'common', 'rare', 'elite', 'super_rare', 'ultra', 'not_available'],
|
|
option_default='all'
|
|
)
|
|
setting.add_setting(
|
|
setting='extra',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 471), delta=delta, button_shape=button_shape, grid_shape=(7, 2), name='FILTER_EXTRA'),
|
|
option_names=['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max', 'can_awaken',
|
|
'can_awaken_plus', 'special', 'oath_skin', 'unique_augment_module', 'not_available', 'not_available', 'not_available'],
|
|
option_default='no_limit'
|
|
)
|
|
return setting
|
|
|
|
def dock_filter_set(
|
|
self,
|
|
sort='level',
|
|
index='all',
|
|
faction='all',
|
|
rarity='all',
|
|
extra='no_limit',
|
|
wait_loading=True
|
|
):
|
|
"""
|
|
A faster filter set function.
|
|
|
|
Args:
|
|
sort (str, list):
|
|
['rarity', 'level', 'total', 'join', 'intimacy', 'mood', 'stat']
|
|
index (str, list):
|
|
['all', 'vanguard', 'main', 'dd', 'cl', 'ca', 'bb',
|
|
'cv', 'repair', 'ss', 'others', 'not_available', 'not_available', 'not_available']
|
|
faction (str, list):
|
|
['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon', 'sardegna',
|
|
'northern', 'iris', 'vichya', 'other', 'not_available', 'not_available', 'not_available']
|
|
rarity (str, list):
|
|
['all', 'common', 'rare', 'elite', 'super_rare', 'ultra', 'not_available']
|
|
extra (str, list):
|
|
['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max', 'can_awaken',
|
|
'can_awaken_plus', 'special', 'oath_skin', 'unique_augment_module', 'not_available', 'not_available', 'not_available'],
|
|
|
|
Pages:
|
|
in: page_dock
|
|
"""
|
|
self.dock_filter_enter()
|
|
self.dock_filter.set(sort=sort, index=index, faction=faction, rarity=rarity, extra=extra)
|
|
self.dock_filter_confirm(wait_loading=wait_loading)
|
|
|
|
def dock_select_one(self, button, skip_first_screenshot=True):
|
|
"""
|
|
Args:
|
|
button (Button): Ship button to select
|
|
skip_first_screenshot:
|
|
"""
|
|
# if self.config.SERVER == 'en':
|
|
# logger.info('EN has no dock_selected check currently, use plain click')
|
|
#
|
|
# self.device.click(button)
|
|
#
|
|
# while 1:
|
|
# self.device.screenshot()
|
|
#
|
|
# if self.appear(DOCK_CHECK, offset=(20, 20)):
|
|
# break
|
|
# if self.handle_popup_confirm('DOCK_SELECT'):
|
|
# continue
|
|
# return
|
|
|
|
while 1:
|
|
if skip_first_screenshot:
|
|
skip_first_screenshot = False
|
|
else:
|
|
self.device.screenshot()
|
|
|
|
if self.dock_selected():
|
|
break
|
|
|
|
if self.appear(DOCK_CHECK, offset=(20, 20), interval=5):
|
|
self.device.click(button)
|
|
continue
|
|
if self.handle_popup_confirm('DOCK_SELECT'):
|
|
continue
|
|
|
|
def dock_selected(self, skip_first_screenshot=True):
|
|
"""
|
|
Args:
|
|
skip_first_screenshot:
|
|
|
|
Returns:
|
|
bool: If selected a ship in dock.
|
|
True for ship counter 1/1, False for 0/1.
|
|
"""
|
|
# if self.config.SERVER == 'en':
|
|
# logger.info('EN has no dock_selected check currently, assume not selected')
|
|
# return False
|
|
|
|
current = 0
|
|
timeout = Timer(1.5, count=3).start()
|
|
while 1:
|
|
if skip_first_screenshot:
|
|
skip_first_screenshot = False
|
|
else:
|
|
self.device.screenshot()
|
|
|
|
if timeout.reached():
|
|
logger.warning('Get dock_selected timeout, assume not selected')
|
|
break
|
|
|
|
current, _, total = OCR_DOCK_SELECTED.ocr(self.device.image)
|
|
if total == 1:
|
|
break
|
|
|
|
return current > 0
|
|
|
|
def dock_select_confirm(self, check_button, skip_first_screenshot=True):
|
|
"""
|
|
Args:
|
|
check_button (callable, Button):
|
|
skip_first_screenshot:
|
|
"""
|
|
while 1:
|
|
if skip_first_screenshot:
|
|
skip_first_screenshot = False
|
|
else:
|
|
self.device.screenshot()
|
|
|
|
if self.ui_process_check_button(check_button):
|
|
break
|
|
|
|
if self.appear_then_click(SHIP_CONFIRM, offset=(200, 50), interval=5):
|
|
continue
|
|
if self.handle_popup_confirm('DOCK_SELECT_CONFIRM'):
|
|
continue
|
|
|
|
|
|
class DockNew(EquipmentNew):
|
|
def handle_dock_cards_loading(self):
|
|
# Poor implementation.
|
|
self.device.sleep((1, 1.5))
|
|
self.device.screenshot()
|
|
|
|
def dock_favourite_set(self, enable=False):
|
|
if DOCK_FAVOURITE.set('on' if enable else 'off', main=self):
|
|
self.handle_dock_cards_loading()
|
|
|
|
def _dock_quit_check_func(self):
|
|
return not self.appear(DOCK_CHECK, offset=(20, 20))
|
|
|
|
def dock_quit(self):
|
|
self.ui_back(check_button=self._dock_quit_check_func, skip_first_screenshot=True)
|
|
|
|
def dock_sort_method_dsc_set(self, enable=True):
|
|
if DOCK_SORTING.set('Descending' if enable else 'Ascending', main=self):
|
|
self.handle_dock_cards_loading()
|
|
|
|
def dock_filter_enter(self):
|
|
self.ui_click(DOCK_FILTER, appear_button=DOCK_CHECK, check_button=DOCK_FILTER_CONFIRM,
|
|
skip_first_screenshot=True)
|
|
|
|
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()
|
|
|
|
@cached_property
|
|
def dock_filter(self) -> Setting:
|
|
delta = (147 + 1 / 3, 57)
|
|
button_shape = (139, 42)
|
|
setting = Setting(name='DOCK', main=self)
|
|
setting.add_setting(
|
|
setting='sort',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 65), delta=delta, button_shape=button_shape, grid_shape=(7, 1), name='FILTER_SORT'),
|
|
# stat has extra grid, not worth pursuing
|
|
option_names=['rarity', 'level', 'total', 'join', 'intimacy', 'mood', 'stat'],
|
|
option_default='level'
|
|
)
|
|
setting.add_setting(
|
|
setting='index',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 138), delta=delta, button_shape=button_shape, grid_shape=(7, 2), name='FILTER_INDEX'),
|
|
option_names=['all', 'vanguard', 'main', 'dd', 'cl', 'ca', 'bb',
|
|
'cv', 'repair', 'ss', 'others', 'not_available', 'not_available', 'not_available'],
|
|
option_default='all'
|
|
)
|
|
setting.add_setting(
|
|
setting='faction',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 268), delta=delta, button_shape=button_shape, grid_shape=(7, 2), name='FILTER_FACTION'),
|
|
option_names=['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon', 'sardegna',
|
|
'northern', 'iris', 'vichya', 'other', 'not_available', 'not_available', 'not_available'],
|
|
option_default='all'
|
|
)
|
|
setting.add_setting(
|
|
setting='rarity',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 398), delta=delta, button_shape=button_shape, grid_shape=(7, 1), name='FILTER_RARITY'),
|
|
option_names=['all', 'common', 'rare', 'elite', 'super_rare', 'ultra', 'not_available'],
|
|
option_default='all'
|
|
)
|
|
setting.add_setting(
|
|
setting='extra',
|
|
option_buttons=ButtonGrid(
|
|
origin=(218, 471), delta=delta, button_shape=button_shape, grid_shape=(7, 2), name='FILTER_EXTRA'),
|
|
option_names=['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max', 'can_awaken',
|
|
'can_awaken_plus', 'special', 'oath_skin', 'unique_augment_module', 'not_available', 'not_available', 'not_available'],
|
|
option_default='no_limit'
|
|
)
|
|
return setting
|
|
|
|
def dock_filter_set(self, sort='level', index='all', faction='all', rarity='all', extra='no_limit', wait_loading=True):
|
|
"""
|
|
A faster filter set function.
|
|
|
|
Args:
|
|
sort (str, list): ['rarity', 'level', 'total', 'join', 'intimacy', 'stat']
|
|
index (str, list): [['all', 'vanguard', 'main', 'dd', 'cl', 'ca'],
|
|
['bb', 'cv', 'repair', 'ss', 'others', 'not_available']]
|
|
faction (str, list): [['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon'],
|
|
['sardegna', 'northern', 'iris', 'vichya', 'other', 'not_available']]
|
|
rarity (str, list): [['all', 'common', 'rare', 'elite', 'super_rare', 'ultra']]
|
|
extra (str, list): [['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max'],
|
|
['can_awaken', 'can_awaken_plus', 'special', 'oath_skin', 'not_available', 'not_available']]
|
|
|
|
Pages:
|
|
in: page_dock
|
|
"""
|
|
self.dock_filter_enter()
|
|
self.dock_filter.set(sort=sort, index=index, faction=faction, rarity=rarity, extra=extra)
|
|
self.dock_filter_confirm()
|
|
|
|
def dock_select_one(self, button, skip_first_screenshot=True):
|
|
"""
|
|
Args:
|
|
button (Button): Ship button to select
|
|
skip_first_screenshot:
|
|
"""
|
|
# if self.config.SERVER == 'en':
|
|
# logger.info('EN has no dock_selected check currently, use plain click')
|
|
#
|
|
# self.device.click(button)
|
|
#
|
|
# while 1:
|
|
# self.device.screenshot()
|
|
#
|
|
# if self.appear(DOCK_CHECK, offset=(20, 20)):
|
|
# break
|
|
# if self.handle_popup_confirm('DOCK_SELECT'):
|
|
# continue
|
|
# return
|
|
|
|
while 1:
|
|
if skip_first_screenshot:
|
|
skip_first_screenshot = False
|
|
else:
|
|
self.device.screenshot()
|
|
|
|
if self.dock_selected():
|
|
break
|
|
|
|
if self.appear(DOCK_CHECK, offset=(20, 20), interval=5):
|
|
self.device.click(button)
|
|
continue
|
|
if self.handle_popup_confirm('DOCK_SELECT'):
|
|
continue
|
|
|
|
def dock_selected(self, skip_first_screenshot=True):
|
|
"""
|
|
Args:
|
|
skip_first_screenshot:
|
|
|
|
Returns:
|
|
bool: If selected a ship in dock.
|
|
True for ship counter 1/1, False for 0/1.
|
|
"""
|
|
# if self.config.SERVER == 'en':
|
|
# logger.info('EN has no dock_selected check currently, assume not selected')
|
|
# return False
|
|
|
|
current = 0
|
|
timeout = Timer(1.5, count=3).start()
|
|
while 1:
|
|
if skip_first_screenshot:
|
|
skip_first_screenshot = False
|
|
else:
|
|
self.device.screenshot()
|
|
|
|
if timeout.reached():
|
|
logger.warning('Get dock_selected timeout, assume not selected')
|
|
break
|
|
|
|
current, _, total = OCR_DOCK_SELECTED.ocr(self.device.image)
|
|
if total == 1:
|
|
break
|
|
|
|
return current > 0
|
|
|
|
def dock_select_confirm(self, check_button, skip_first_screenshot=True):
|
|
"""
|
|
Args:
|
|
check_button (callable, Button):
|
|
skip_first_screenshot:
|
|
"""
|
|
while 1:
|
|
if skip_first_screenshot:
|
|
skip_first_screenshot = False
|
|
else:
|
|
self.device.screenshot()
|
|
|
|
if self.ui_process_check_button(check_button):
|
|
break
|
|
|
|
if self.appear_then_click(SHIP_CONFIRM, offset=(200, 50), interval=5):
|
|
continue
|
|
if self.handle_popup_confirm('DOCK_SELECT_CONFIRM'):
|
|
continue
|
|
|
|
|
|
def redirect_inherit_to_old() -> bool:
|
|
current_task = gl.gl_get("g_current_task", "")
|
|
current_config = gl.gl_get("g_config", None)
|
|
|
|
if current_task == "GemsFarming":
|
|
return True
|
|
elif current_task.find("Main") != -1:
|
|
return True
|
|
elif current_task.find("Event") != -1:
|
|
return True
|
|
elif current_task == "OpsiAshBeacon":
|
|
return True
|
|
else:
|
|
return False
|
|
|
|
return False
|
|
|
|
|
|
class Dock(StorageHandler):
|
|
def __init__(self, config, device=None, task=None):
|
|
conf = AzurLaneConfig.build_azurlane_config(config, task)
|
|
dev = Device.build_device(conf, device)
|
|
|
|
self.dock_old: DockOld = DockOld(config=conf, device=dev, task=task)
|
|
self.dock_new: DockNew = DockNew(config=conf, device=dev, task=task)
|
|
StorageHandler.__init__(self, config=conf, device=dev, task=task)
|
|
|
|
self.dock_switch_stack = collections.deque()
|
|
self.dock_current_use = self.dock_new
|
|
|
|
def switch_dock_to_old(self):
|
|
self.dock_switch_stack.append(self.dock_current_use)
|
|
self.dock_current_use = self.dock_old
|
|
|
|
def switch_dock_to_new(self):
|
|
self.dock_switch_stack.append(self.dock_current_use)
|
|
self.dock_current_use = self.dock_new
|
|
|
|
def switch_dock_back(self):
|
|
if len(self.dock_switch_stack) == 0:
|
|
self.dock_current_use = self.dock_new
|
|
return
|
|
|
|
self.dock_current_use = self.dock_switch_stack.pop()
|
|
|
|
'''
|
|
DockOld
|
|
'''
|
|
|
|
'''in Public section'''
|
|
# def handle_dock_cards_loading(self):
|
|
# return self.dock_old.handle_dock_cards_loading()
|
|
|
|
def dock_favourite_set(self, *args, **kwargs):
|
|
if "wait_loading" in kwargs:
|
|
return self.dock_old.dock_favourite_set(*args, **kwargs)
|
|
else:
|
|
return self.dock_new.dock_favourite_set(*args, **kwargs)
|
|
|
|
'''in Public section'''
|
|
# def _dock_quit_check_func(self):
|
|
# return self.dock_old._dock_quit_check_func()
|
|
|
|
'''in Public section'''
|
|
# def dock_quit(self):
|
|
# return self.dock_old.dock_quit()
|
|
|
|
def dock_sort_method_dsc_set(self, *args, **kwargs):
|
|
if "wait_loading" in kwargs:
|
|
return self.dock_old.dock_sort_method_dsc_set(*args, **kwargs)
|
|
else:
|
|
return self.dock_new.dock_sort_method_dsc_set(*args, **kwargs)
|
|
|
|
'''in Public section'''
|
|
# def dock_filter_enter(self):
|
|
# return self.dock_old.dock_filter_enter()
|
|
|
|
'''in Public section'''
|
|
# def dock_filter_confirm(self, wait_loading=True):
|
|
# return self.dock_old.dock_filter_confirm(wait_loading=wait_loading)
|
|
|
|
'''in Public section'''
|
|
# @cached_property
|
|
# def dock_filter(self) -> Setting:
|
|
# return self.dock_old.dock_filter
|
|
|
|
'''in Public section'''
|
|
# def dock_filter_set(
|
|
# self,
|
|
# sort='level',
|
|
# index='all',
|
|
# faction='all',
|
|
# rarity='all',
|
|
# extra='no_limit',
|
|
# wait_loading=True
|
|
# ):
|
|
# return self.dock_old.dock_filter_set()
|
|
|
|
'''in Public section'''
|
|
# def dock_select_one(self, button, skip_first_screenshot=True):
|
|
# return self.dock_old.dock_select_one(button, skip_first_screenshot=skip_first_screenshot)
|
|
|
|
'''in Public section'''
|
|
# def dock_selected(self, skip_first_screenshot=True):
|
|
# return self.dock_old.dock_selected(skip_first_screenshot=skip_first_screenshot)
|
|
|
|
'''in Public section'''
|
|
# def dock_select_confirm(self, check_button, skip_first_screenshot=True):
|
|
# return self.dock_old.dock_select_confirm(check_button, skip_first_screenshot=skip_first_screenshot)
|
|
|
|
'''
|
|
DockOld.EquipmentOld
|
|
'''
|
|
|
|
@cached_property
|
|
def equipment_has_take_on(self):
|
|
return self.dock_old.equipment_has_take_on
|
|
|
|
def equipping_set(self, enable=False):
|
|
return self.dock_old.equipping_set(enable=enable)
|
|
|
|
def _equip_view_swipe(self, distance, check_button=EQUIPMENT_OPEN):
|
|
return self.dock_old._equip_view_swipe(distance, check_button=check_button)
|
|
|
|
def equip_view_next(self, check_button=EQUIPMENT_OPEN):
|
|
return self.dock_old.equip_view_next(check_button=check_button)
|
|
|
|
def equip_view_prev(self, check_button=EQUIPMENT_OPEN):
|
|
return self.dock_old.equip_view_prev(check_button=check_button)
|
|
|
|
def equip_enter(self, click_button, check_button=EQUIPMENT_OPEN, long_click=True, skil_first_screenshot=True):
|
|
return self.dock_old.equip_enter(click_button=click_button, check_button=check_button, long_click=long_click,skil_first_screenshot=skil_first_screenshot)
|
|
|
|
@cached_property
|
|
def _equip_side_navbar(self):
|
|
return self.dock_old._equip_side_navbar
|
|
|
|
def equip_side_navbar_ensure(self, upper=None, bottom=None):
|
|
return self.dock_old.equip_side_navbar_ensure(upper=upper, bottom=bottom)
|
|
|
|
def _equip_take_off_one(self, skip_first_screenshot=True):
|
|
return self.dock_old._equip_take_off_one(skip_first_screenshot=skip_first_screenshot)
|
|
|
|
def equipment_take_off(self, enter, out, fleet):
|
|
return self.dock_old.equipment_take_off(enter, out, fleet=fleet)
|
|
|
|
def _equip_take_on_one(self, index, skip_first_screenshot=True):
|
|
return self.dock_old._equip_take_on_one(index=index, skip_first_screenshot=skip_first_screenshot)
|
|
|
|
def equipment_take_on(self, enter, out, fleet):
|
|
return self.dock_old.equipment_take_on(enter, out, fleet=fleet)
|
|
|
|
'''
|
|
DockNew
|
|
'''
|
|
|
|
'''in Public section'''
|
|
# def handle_dock_cards_loading(self):
|
|
# return self.dock_new.handle_dock_cards_loading()
|
|
|
|
'''in DockOld section'''
|
|
# def dock_favourite_set(self, enable=False):
|
|
# return self.dock_new.dock_favourite_set(enable=enable)
|
|
|
|
'''in Public section'''
|
|
# def _dock_quit_check_func(self):
|
|
# return self.dock_new._dock_quit_check_func()
|
|
|
|
'''in Public section'''
|
|
# def dock_quit(self):
|
|
# return self.dock_new.dock_quit()
|
|
|
|
'''in DockOld section'''
|
|
# def dock_sort_method_dsc_set(self, enable=True):
|
|
# return self.dock_new.dock_sort_method_dsc_set(enable=enable)
|
|
|
|
'''in Public section'''
|
|
# def dock_filter_enter(self):
|
|
# return self.dock_new.dock_filter_enter()
|
|
|
|
'''in Public section'''
|
|
# def dock_filter_confirm(self, wait_loading=True):
|
|
# return self.dock_new.dock_filter_confirm(wait_loading=wait_loading)
|
|
|
|
'''in Public section'''
|
|
# @cached_property
|
|
# def dock_filter(self) -> Setting:
|
|
# return self.dock_new.dock_filter
|
|
|
|
'''in Public section'''
|
|
# def dock_filter_set(self, sort='level', index='all', faction='all', rarity='all', extra='no_limit', wait_loading=True):
|
|
# return self.dock_new.dock_filter_set(sort, index, faction, rarity, extra, wait_loading)
|
|
|
|
'''in Public section'''
|
|
# def dock_select_one(self, button, skip_first_screenshot=True):
|
|
# return self.dock_new.dock_select_one(button, skip_first_screenshot=skip_first_screenshot)
|
|
|
|
'''in Public section'''
|
|
# def dock_selected(self, skip_first_screenshot=True):
|
|
# return self.dock_new.dock_selected(skip_first_screenshot=skip_first_screenshot)
|
|
|
|
'''in Public section'''
|
|
# def dock_select_confirm(self, check_button, skip_first_screenshot=True):
|
|
# return self.dock_new.dock_select_confirm(check_button, skip_first_screenshot=skip_first_screenshot)
|
|
|
|
'''
|
|
DockNew.EquipmentNew
|
|
'''
|
|
|
|
@cached_property
|
|
def equipment_has_take_on(self):
|
|
return self.dock_new.equipment_has_take_on
|
|
|
|
def _ship_view_swipe(self, distance, check_button=EQUIPMENT_OPEN):
|
|
return self.dock_new._ship_view_swipe(distance, check_button=check_button)
|
|
|
|
def ship_view_next(self, check_button=EQUIPMENT_OPEN):
|
|
return self.dock_new.ship_view_next(check_button=check_button)
|
|
|
|
def ship_view_prev(self, check_button=EQUIPMENT_OPEN):
|
|
return self.dock_new.ship_view_prev(check_button=check_button)
|
|
|
|
def ship_info_enter(self, click_button, check_button=EQUIPMENT_OPEN, long_click=True, skil_first_screenshot=True):
|
|
return self.dock_new.ship_info_enter(click_button=click_button, check_button=check_button, long_click=long_click, skil_first_screenshot=skil_first_screenshot)
|
|
|
|
@cached_property
|
|
def _ship_side_navbar(self):
|
|
return self.dock_new._ship_side_navbar
|
|
|
|
def ship_side_navbar_ensure(self, upper=None, bottom=None):
|
|
return self.dock_new.ship_side_navbar_ensure(upper=upper, bottom=bottom)
|
|
|
|
def ship_equipment_take_off(self, skip_first_screenshot=True):
|
|
return self.dock_new.ship_equipment_take_off(skip_first_screenshot=skip_first_screenshot)
|
|
|
|
def fleet_equipment_take_off(self, enter, long_click, out):
|
|
return self.fleet_equipment_take_off(enter, long_click, out)
|
|
|
|
def ship_equipment_take_on_preset(self, index, skip_first_screenshot=True):
|
|
return self.dock_new.ship_equipment_take_off(index, skip_first_screenshot=skip_first_screenshot)
|
|
|
|
def fleet_equipment_take_on_preset(self, preset_record, enter, long_click, out):
|
|
return self.dock_new.fleet_equipment_take_off(enter, long_click, out)
|
|
|
|
'''
|
|
Public
|
|
'''
|
|
|
|
def handle_dock_cards_loading(self):
|
|
return self.dock_current_use.handle_dock_cards_loading()
|
|
|
|
def _dock_quit_check_func(self):
|
|
return self.dock_current_use._dock_quit_check_func()
|
|
|
|
def dock_quit(self):
|
|
return self.dock_current_use.dock_quit()
|
|
|
|
def dock_filter_enter(self):
|
|
return self.dock_current_use.dock_filter_enter()
|
|
|
|
def dock_filter_confirm(self, wait_loading=True):
|
|
return self.dock_current_use.dock_filter_confirm(wait_loading=wait_loading)
|
|
|
|
@cached_property
|
|
def dock_filter(self) -> Setting:
|
|
return self.dock_current_use.dock_filter
|
|
|
|
def dock_filter_set(self, sort='level', index='all', faction='all', rarity='all', extra='no_limit', wait_loading=True):
|
|
return self.dock_current_use.dock_filter_set(sort, index, faction, rarity, extra, wait_loading)
|
|
|
|
def dock_select_one(self, button, skip_first_screenshot=True):
|
|
return self.dock_current_use.dock_select_one(button, skip_first_screenshot=skip_first_screenshot)
|
|
|
|
def dock_selected(self, skip_first_screenshot=True):
|
|
return self.dock_current_use.dock_selected(skip_first_screenshot=skip_first_screenshot)
|
|
|
|
def dock_select_confirm(self, check_button, skip_first_screenshot=True):
|
|
return self.dock_current_use.dock_select_confirm(check_button, skip_first_screenshot=skip_first_screenshot)
|