mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-09 22:32:12 +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__(
|
def __init__(
|
||||||
self, structure: dict[str, Any], group: Optional[dict[str, Any]] = None
|
self, structure: dict[str, Any], group: Optional[dict[str, Any]] = None
|
||||||
) -> None:
|
) -> None:
|
||||||
self.tags: Tags = structure["tags"]
|
super().__init__(structure["tags"])
|
||||||
|
|
||||||
self.exception: dict[str, str] = {}
|
self.exception: dict[str, str] = {}
|
||||||
if "exception" in structure:
|
if "exception" in structure:
|
||||||
|
@ -546,14 +546,14 @@ class Scheme:
|
||||||
returned: IconSet = IconSet(main_icon, extra_icons, processed)
|
returned: IconSet = IconSet(main_icon, extra_icons, processed)
|
||||||
self.cache[tags_hash] = returned, priority
|
self.cache[tags_hash] = returned, priority
|
||||||
|
|
||||||
for key in ["direction", "camera:direction"]:
|
for key in "direction", "camera:direction":
|
||||||
if key in tags:
|
if key in tags:
|
||||||
for specification in main_icon.shape_specifications:
|
for specification in main_icon.shape_specifications:
|
||||||
if (
|
if (
|
||||||
DirectionSet(tags[key]).is_right() is False
|
DirectionSet(tags[key]).is_right() is not None
|
||||||
and specification.shape.is_right_directed is True
|
and specification.shape.is_right_directed is not None
|
||||||
or DirectionSet(tags[key]).is_right() is True
|
and DirectionSet(tags[key]).is_right()
|
||||||
and specification.shape.is_right_directed is False
|
!= specification.shape.is_right_directed
|
||||||
):
|
):
|
||||||
specification.flip_horizontally = True
|
specification.flip_horizontally = True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue