1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 00:28:20 +08:00

Feature: New OpsiShop. (#3086)

* feat: New OpsiShop

* fix: use AdaptiveScroll

* feat: scan counter

* perf: calculate y value
This commit is contained in:
霞飛
2024-06-17 11:24:40 +08:00
committed by GitHub
parent a70d4c4675
commit 0b97b40c46
116 changed files with 1178 additions and 342 deletions

View File

@@ -1,3 +1,4 @@
from functools import reduce
import re
from module.logger import logger
@@ -45,7 +46,7 @@ class Filter:
"""
Args:
objs (list): List of objects and strings
func (callable): A function to filter object.
func (callable): A function that to filter object.
Function should receive an object as arguments, and return a bool.
True means add it to output.
@@ -76,6 +77,19 @@ class Filter:
return out
def applys(self, objs, funcs):
"""
Args:
objs (list): List of objects and strings
List[func(callable)] : A list of funciton that to filter object.
Function should receive an object as arguments, and return a bool.
True means add it to output.
Returns:
list: A list of objects and preset strings, such as [object, object, object, 'reset']
"""
return self.apply(objs, func=lambda x: all(func(x)for func in funcs))
def apply_filter_to_obj(self, obj, filter):
"""
Args: