2023-08-02 11:07:46 +00:00
|
|
|
import re
|
2023-06-19 13:57:19 +00:00
|
|
|
from dataclasses import dataclass
|
|
|
|
from typing import ClassVar
|
|
|
|
|
|
|
|
from module.ocr.keyword import Keyword
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass(repr=False)
|
|
|
|
class BattlePassTab(Keyword):
|
|
|
|
instances: ClassVar = {}
|
2023-08-02 11:07:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
@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)
|
|
|
|
|
2024-01-01 16:43:34 +00:00
|
|
|
def __hash__(self) -> int:
|
|
|
|
return super().__hash__()
|
|
|
|
|
2023-08-02 11:07:46 +00:00
|
|
|
|
|
|
|
@dataclass(repr=False)
|
|
|
|
class BattlePassQuestState(Keyword):
|
|
|
|
instances: ClassVar = {}
|