mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 18:05:26 +00:00
36 lines
721 B
Python
36 lines
721 B
Python
import re
|
|
from dataclasses import dataclass
|
|
from typing import ClassVar
|
|
|
|
from module.ocr.keyword import Keyword
|
|
|
|
|
|
@dataclass(repr=False)
|
|
class BattlePassTab(Keyword):
|
|
instances: ClassVar = {}
|
|
|
|
|
|
@dataclass(repr=False)
|
|
class BattlePassMissionTab(Keyword):
|
|
instances: ClassVar = {}
|
|
|
|
|
|
@dataclass(repr=False)
|
|
class BattlePassQuest(Keyword):
|
|
instances: ClassVar = {}
|
|
|
|
@classmethod
|
|
def _compare(cls, name, keyword):
|
|
def remove_digit(text):
|
|
return re.sub(r"\d", "", text)
|
|
|
|
return remove_digit(name) == remove_digit(keyword)
|
|
|
|
def __hash__(self) -> int:
|
|
return super().__hash__()
|
|
|
|
|
|
@dataclass(repr=False)
|
|
class BattlePassQuestState(Keyword):
|
|
instances: ClassVar = {}
|