mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 15:49:25 +08:00
Fix: dock_filter_set() got an unexpected keyword argument 'wait_loading' while using DockNew. DockNew inherited UI, which is not the origin purpose. Forced using old method in order to run away from shit of air111. Todo: fix gl unstable errors
This commit is contained in:
@@ -564,7 +564,7 @@ def equip_redirect_inherit_to_old() -> bool:
|
||||
return False
|
||||
|
||||
|
||||
class Equipment(EquipmentOld if equip_redirect_inherit_to_old() else EquipmentNew):
|
||||
class Equipment(EquipmentOld if equip_redirect_inherit_to_old() else EquipmentOld):
|
||||
def __init__(self, *args, **kwargs):
|
||||
if isinstance(self, EquipmentOld):
|
||||
logger.info("use EquipmentOld")
|
||||
|
||||
@@ -315,7 +315,7 @@ class EquipmentChangeNew(Equipment):
|
||||
return
|
||||
|
||||
|
||||
class EquipmentChange(EquipmentChangeOld if gl.gl_get("g_current_task", "") == "GemsFarming" else EquipmentChangeNew):
|
||||
class EquipmentChange(EquipmentChangeOld if gl.gl_get("g_current_task", "") == "GemsFarming" else EquipmentChangeOld):
|
||||
def __init__(self, *args, **kwargs):
|
||||
if isinstance(self, EquipmentChangeOld):
|
||||
logger.info("use EquipmentChangeOld")
|
||||
|
||||
@@ -79,7 +79,7 @@ class FleetEquipmentNew(EquipmentChange):
|
||||
self.ui_back(FLEET_CHECK)
|
||||
|
||||
|
||||
class FleetEquipment(DailyEquipment if gl.gl_get("g_current_task", "") == "GemsFarming" else FleetEquipmentNew):
|
||||
class FleetEquipment(DailyEquipment if gl.gl_get("g_current_task", "") == "GemsFarming" else FleetEquipmentOld):
|
||||
def __init__(self, *args, **kwargs):
|
||||
if isinstance(self, DailyEquipment):
|
||||
logger.info("use DailyEquipment")
|
||||
|
||||
@@ -105,7 +105,7 @@ class ExerciseEquipmentNew(EquipmentChange):
|
||||
self._inactive_edit()
|
||||
|
||||
|
||||
class ExerciseEquipment(ExerciseEquipmentOld if gl.gl_get("g_current_task", "") == "GemsFarming" else ExerciseEquipmentNew):
|
||||
class ExerciseEquipment(ExerciseEquipmentOld if gl.gl_get("g_current_task", "") == "GemsFarming" else ExerciseEquipmentOld):
|
||||
def __init__(self, *args, **kwargs):
|
||||
if isinstance(self, ExerciseEquipmentOld):
|
||||
logger.info("use ExerciseEquipmentOld")
|
||||
|
||||
@@ -52,7 +52,7 @@ class HardEquipmentNew(EquipmentChange):
|
||||
return True
|
||||
|
||||
|
||||
class HardEquipment(HardEquipmentOld if gl.gl_get("g_current_task", "") == "GemsFarming" else HardEquipmentNew):
|
||||
class HardEquipment(HardEquipmentOld if gl.gl_get("g_current_task", "") == "GemsFarming" else HardEquipmentOld):
|
||||
def __init__(self, *args, **kwargs):
|
||||
if isinstance(self, HardEquipmentOld):
|
||||
logger.info("use HardEquipmentOld")
|
||||
|
||||
@@ -221,7 +221,7 @@ class DockOld(Equipment):
|
||||
continue
|
||||
|
||||
|
||||
class DockNew(UI):
|
||||
class DockNew(Equipment):
|
||||
def handle_dock_cards_loading(self):
|
||||
# Poor implementation.
|
||||
self.device.sleep((1, 1.5))
|
||||
@@ -245,7 +245,7 @@ class DockNew(UI):
|
||||
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()
|
||||
|
||||
@@ -295,7 +295,7 @@ class DockNew(UI):
|
||||
)
|
||||
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.
|
||||
|
||||
@@ -421,7 +421,7 @@ def redirect_inherit_to_old() -> bool:
|
||||
return False
|
||||
|
||||
|
||||
class Dock(DockOld if redirect_inherit_to_old() else DockNew):
|
||||
class Dock(DockOld if redirect_inherit_to_old() else DockOld):
|
||||
def __init__(self, *args, **kwargs):
|
||||
if isinstance(self, DockOld):
|
||||
logger.info("use DockOld")
|
||||
|
||||
Reference in New Issue
Block a user