Upd: Character (#304)

This commit is contained in:
Zero 2024-02-06 15:10:15 +08:00 committed by GitHub
parent 6b31fb0260
commit cfde77f7ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 3 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/character/Misha.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -123,6 +123,7 @@ def replace_templates(text: str) -> str:
text = re.sub(r'#4', '1', text) text = re.sub(r'#4', '1', text)
text = re.sub(r'</?\w+>', '', text) text = re.sub(r'</?\w+>', '', text)
text = re.sub(r'<color=#?\w+>', '', text) text = re.sub(r'<color=#?\w+>', '', text)
text = re.sub(r'{.*?}', '', text)
return text return text
@ -388,7 +389,7 @@ class KeywordExtract:
gen.ObjectAttr(key='name', value=name) gen.ObjectAttr(key='name', value=name)
for lang in UI_LANGUAGES: for lang in UI_LANGUAGES:
character_names = ' / '.join([ character_names = ' / '.join([
self.find_keyword(c[0], lang)[1] replace_templates(self.find_keyword(c[0], lang)[1])
for c in characters for c in characters
]) ])
damage_type = self.find_keyword(characters[0][1], lang)[1] damage_type = self.find_keyword(characters[0][1], lang)[1]

View File

@ -92,7 +92,7 @@ class ConfigGenerator:
options=[dungeon.name for dungeon in DungeonList.instances.values() if dungeon.is_Echo_of_War]) options=[dungeon.name for dungeon in DungeonList.instances.values() if dungeon.is_Echo_of_War])
# Insert characters # Insert characters
from tasks.character.keywords import CharacterList from tasks.character.keywords import CharacterList
unsupported_characters = [] unsupported_characters = ['Sparkle']
characters = [character.name for character in CharacterList.instances.values() characters = [character.name for character in CharacterList.instances.values()
if character.name not in unsupported_characters] if character.name not in unsupported_characters]
option_add(keys='DungeonSupport.Character.option', options=characters) option_add(keys='DungeonSupport.Character.option', options=characters)