mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-15 22:19:18 +00:00
Add: Extract map worlds
This commit is contained in:
parent
dff1b14706
commit
5cf1f19491
@ -287,6 +287,8 @@ class KeywordExtract:
|
|||||||
gen = self.write_keywords(keyword_class='MapPlane', output_file='',
|
gen = self.write_keywords(keyword_class='MapPlane', output_file='',
|
||||||
text_convert=text_convert(world), generator=gen)
|
text_convert=text_convert(world), generator=gen)
|
||||||
gen.write('./tasks/map/keywords/plane.py')
|
gen.write('./tasks/map/keywords/plane.py')
|
||||||
|
self.load_keywords(['Herta Space Station', 'Jarilo-VI', 'The Xianzhou Luofu'], lang='en')
|
||||||
|
self.write_keywords(keyword_class='MapWorld', output_file='./tasks/map/keywords/world.py')
|
||||||
|
|
||||||
def generate_character_keywords(self):
|
def generate_character_keywords(self):
|
||||||
self.load_character_name_keywords()
|
self.load_character_name_keywords()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import tasks.map.keywords.plane as KEYWORDS_MAP_PLANE
|
import tasks.map.keywords.plane as KEYWORDS_MAP_PLANE
|
||||||
from tasks.map.keywords.classes import MapPlane
|
import tasks.map.keywords.world as KEYWORDS_MAP_WORLD
|
||||||
|
from tasks.map.keywords.classes import MapPlane, MapWorld
|
||||||
|
|
||||||
# Herta
|
# Herta
|
||||||
KEYWORDS_MAP_PLANE.Herta_StorageZone.floors = ['B1', 'F1', 'F2']
|
KEYWORDS_MAP_PLANE.Herta_StorageZone.floors = ['B1', 'F1', 'F2']
|
||||||
@ -17,5 +18,6 @@ KEYWORDS_MAP_PLANE.Luofu_Cloudford.floors = ['F1', 'F2']
|
|||||||
KEYWORDS_MAP_PLANE.Luofu_StargazerNavalia.floors = ['F1', 'F2']
|
KEYWORDS_MAP_PLANE.Luofu_StargazerNavalia.floors = ['F1', 'F2']
|
||||||
KEYWORDS_MAP_PLANE.Luofu_DivinationCommission.floors = ['F1', 'F2']
|
KEYWORDS_MAP_PLANE.Luofu_DivinationCommission.floors = ['F1', 'F2']
|
||||||
KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.floors = ['F1', 'F2']
|
KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.floors = ['F1', 'F2']
|
||||||
|
KEYWORDS_MAP_PLANE.Luofu_ArtisanshipCommission.page = 'bottom'
|
||||||
KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.page = 'bottom'
|
KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.page = 'bottom'
|
||||||
KEYWORDS_MAP_PLANE.Luofu_ScalegorgeWaterscape.page = 'bottom'
|
KEYWORDS_MAP_PLANE.Luofu_ScalegorgeWaterscape.page = 'bottom'
|
||||||
|
@ -107,3 +107,8 @@ class MapPlane(Keyword):
|
|||||||
raise ScriptError(f'Plane {self} does not have floor name {floor}')
|
raise ScriptError(f'Plane {self} does not have floor name {floor}')
|
||||||
else:
|
else:
|
||||||
raise ScriptError(f'Plane {self} does not have floor {floor}')
|
raise ScriptError(f'Plane {self} does not have floor {floor}')
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(repr=False)
|
||||||
|
class MapWorld(Keyword):
|
||||||
|
instances: ClassVar = {}
|
||||||
|
32
tasks/map/keywords/world.py
Normal file
32
tasks/map/keywords/world.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
from .classes import MapWorld
|
||||||
|
|
||||||
|
# This file was auto-generated, do not modify it manually. To generate:
|
||||||
|
# ``` python -m dev_tools.keyword_extract ```
|
||||||
|
|
||||||
|
Herta_Space_Station = MapWorld(
|
||||||
|
id=1,
|
||||||
|
name='Herta_Space_Station',
|
||||||
|
cn='空间站「黑塔」',
|
||||||
|
cht='太空站「黑塔」',
|
||||||
|
en='Herta Space Station',
|
||||||
|
jp='宇宙ステーション「ヘルタ」',
|
||||||
|
es='Estación Espacial Herta',
|
||||||
|
)
|
||||||
|
Jarilo_VI = MapWorld(
|
||||||
|
id=2,
|
||||||
|
name='Jarilo_VI',
|
||||||
|
cn='雅利洛-Ⅵ',
|
||||||
|
cht='雅利洛-Ⅵ',
|
||||||
|
en='Jarilo-VI',
|
||||||
|
jp='ヤリーロ-VI',
|
||||||
|
es='Jarilo-VI',
|
||||||
|
)
|
||||||
|
The_Xianzhou_Luofu = MapWorld(
|
||||||
|
id=3,
|
||||||
|
name='The_Xianzhou_Luofu',
|
||||||
|
cn='仙舟「罗浮」',
|
||||||
|
cht='仙舟「羅浮」',
|
||||||
|
en='The Xianzhou Luofu',
|
||||||
|
jp='仙舟「羅浮」',
|
||||||
|
es='El Luofu de Xianzhou',
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user