Skip to content

Commit bfc62a9

Browse files
committed
Update build data generation script so that it preserves existing command names
1 parent 944c9a0 commit bfc62a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

generate_build_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def combine_lookups(old_unit_lookup, old_ability_lookup, new_unit_lookup, new_ab
172172
# unit names.
173173
unit_lookup.update(old_unit_lookup)
174174

175-
# When merging old and new ability lookups, prefer to overwrite old cell data with new cell data when merging rows
176-
# in the case of a key clash, but preserve old cell data if cell is empty in new ability lookup table
175+
# When merging old and new ability lookups, prefer to preserve old cell data over new cell data when merging rows
176+
# in the case of a key clash, but use new cell data if old cell data is empty.
177177
for ability_name, commands in new_ability_lookup.items():
178178
if ability_name not in ability_lookup:
179179
ability_lookup[ability_name] = commands
@@ -183,7 +183,7 @@ def combine_lookups(old_unit_lookup, old_ability_lookup, new_unit_lookup, new_ab
183183
while len(ability_lookup[ability_name]) <= i:
184184
ability_lookup[ability_name].append("")
185185

186-
if command != "":
186+
if ability_lookup[ability_name][i] == "":
187187
ability_lookup[ability_name][i] = command
188188

189189
return unit_lookup, ability_lookup

0 commit comments

Comments
 (0)