mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-09 14:21:50 +02:00
Simplify condition.
This commit is contained in:
parent
33854f9d75
commit
6d80eb1812
1 changed files with 6 additions and 6 deletions
|
@ -108,7 +108,7 @@ class Matcher(Tagged):
|
|||
def __init__(
|
||||
self, structure: dict[str, Any], group: Optional[dict[str, Any]] = None
|
||||
) -> None:
|
||||
self.tags: Tags = structure["tags"]
|
||||
super().__init__(structure["tags"])
|
||||
|
||||
self.exception: dict[str, str] = {}
|
||||
if "exception" in structure:
|
||||
|
@ -546,14 +546,14 @@ class Scheme:
|
|||
returned: IconSet = IconSet(main_icon, extra_icons, processed)
|
||||
self.cache[tags_hash] = returned, priority
|
||||
|
||||
for key in ["direction", "camera:direction"]:
|
||||
for key in "direction", "camera:direction":
|
||||
if key in tags:
|
||||
for specification in main_icon.shape_specifications:
|
||||
if (
|
||||
DirectionSet(tags[key]).is_right() is False
|
||||
and specification.shape.is_right_directed is True
|
||||
or DirectionSet(tags[key]).is_right() is True
|
||||
and specification.shape.is_right_directed is False
|
||||
DirectionSet(tags[key]).is_right() is not None
|
||||
and specification.shape.is_right_directed is not None
|
||||
and DirectionSet(tags[key]).is_right()
|
||||
!= specification.shape.is_right_directed
|
||||
):
|
||||
specification.flip_horizontally = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue