Skip to content

Commit

Permalink
Fix #1623: Switch template_brush to use Unicode for the template listing
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Jul 5, 2021
1 parent a2d99ab commit a7b64df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/packages/template_brush.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ def write_templates(game: gameMan.Game) -> None:
template_list.append(temp_el)

with atomic_write(game.abs_path('bin/bee2/templates.lst'), mode='wb', overwrite=True) as f:
root.export_binary(f, fmt_name='bee_templates')
root.export_binary(f, fmt_name='bee_templates', unicode='format')
2 changes: 1 addition & 1 deletion src/precomp/template_brush.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def parse_temp_name(name) -> tuple[str, set[str]]:
def load_templates(path: str) -> None:
"""Load in the template file, used for import_template()."""
with open(path, 'rb') as f:
dmx, fmt_name, fmt_ver = DMElement.parse(f)
dmx, fmt_name, fmt_ver = DMElement.parse(f, unicode=True)
if fmt_name != 'bee_templates' or fmt_ver not in [1]:
raise ValueError(f'Invalid template file format "{fmt_name}" v{fmt_ver}')
temp_list = dmx['temp']
Expand Down

0 comments on commit a7b64df

Please sign in to comment.