Skip to content

Commit 21d8411

Browse files
committed
Load basic map information from localization files.
1 parent b4da277 commit 21d8411

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

sc2reader/resources.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,11 @@ def __init__(self, summary_file, filename=None, **options):
719719
self.game_type = self.settings['Teams'].replace(" ","")
720720
self.real_type = real_type(self.teams.values())
721721

722+
map_strings = self.lang_sheets['enUS'][-1]
723+
self.map_name = map_strings[1]
724+
self.map_description = map_strings[2]
725+
self.map_tileset = map_strings[3]
726+
722727
# The s2gs file also keeps reference to a series of s2mv files
723728
# Some of these appear to be encoded bytes and others appear to be
724729
# the preview images that authors may bundle with their maps.
@@ -785,9 +790,9 @@ def load_translations(self):
785790
for lang, files in self.localization_urls.items():
786791
if lang != 'enUS': continue
787792

788-
sheets = dict()
789-
for sheet, depot_file in enumerate(files):
790-
sheets[sheet] = self.factory.load_localization(depot_file)
793+
sheets = list()
794+
for depot_file in files:
795+
sheets.append(self.factory.load_localization(depot_file))
791796

792797
translation = dict()
793798
for uid, (sheet, item) in self.id_map.items():

0 commit comments

Comments
 (0)