mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-03 16:49:10 +02:00
Issue #39: fix shape direction processing.
This commit is contained in:
parent
65c50be6fe
commit
9af7d5f2d9
2 changed files with 12 additions and 5 deletions
|
@ -64,8 +64,11 @@ class Shape:
|
|||
"""
|
||||
shape = cls(path, offset, id_, name)
|
||||
|
||||
if "right_directed" in structure:
|
||||
shape.is_right_directed = structure["right_directed"]
|
||||
if "directed" in structure:
|
||||
if structure["directed"] == "right":
|
||||
shape.is_right_directed = True
|
||||
if structure["directed"] == "left":
|
||||
shape.is_right_directed = False
|
||||
|
||||
if "emoji" in structure:
|
||||
emojis = structure["emoji"]
|
||||
|
|
|
@ -360,9 +360,13 @@ class Scheme:
|
|||
|
||||
for key in ["direction", "camera:direction"]:
|
||||
if key in tags:
|
||||
if DirectionSet(tags[key]).is_right() is False:
|
||||
for specification in main_icon.shape_specifications:
|
||||
if specification.shape.is_right_directed is True:
|
||||
for specification in main_icon.shape_specifications:
|
||||
if (
|
||||
DirectionSet(tags[key]).is_right() is False
|
||||
and specification.shape.is_right_directed is True
|
||||
or specification.shape.is_right_directed is True
|
||||
and specification.shape.is_right_directed is False
|
||||
):
|
||||
specification.flip_horizontally = True
|
||||
|
||||
return returned, priority
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue