mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-29 02:57:25 +00:00
28d5c43602
* Add: battle pass mission recognition * Fix: typo * Add: version mission recognition * Fix: typo * Upd: remove version mission * Upd: keep ui of version quest
33 lines
655 B
Python
33 lines
655 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)
|
|
|
|
|
|
@dataclass(repr=False)
|
|
class BattlePassQuestState(Keyword):
|
|
instances: ClassVar = {}
|