mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-22 21:46:24 +02:00
Add all
value to --level argument.
This commit is contained in:
parent
b8999a7d07
commit
ccf693455f
1 changed files with 9 additions and 10 deletions
|
@ -165,17 +165,16 @@ class Constructor:
|
|||
self.extractor: ShapeExtractor = extractor
|
||||
self.configuration: MapConfiguration = configuration
|
||||
|
||||
if self.configuration.level:
|
||||
if self.configuration.level == "overground":
|
||||
self.check_level = check_level_overground
|
||||
elif self.configuration.level == "underground":
|
||||
self.check_level = lambda x: not check_level_overground(x)
|
||||
else:
|
||||
self.check_level = lambda x: not check_level_number(
|
||||
x, float(self.configuration.level)
|
||||
)
|
||||
else:
|
||||
if self.configuration.level == "all":
|
||||
self.check_level = lambda x: True
|
||||
elif self.configuration.level == "overground":
|
||||
self.check_level = check_level_overground
|
||||
elif self.configuration.level == "underground":
|
||||
self.check_level = lambda x: not check_level_overground(x)
|
||||
else:
|
||||
self.check_level = lambda x: not check_level_number(
|
||||
x, float(self.configuration.level)
|
||||
)
|
||||
|
||||
self.points: list[Point] = []
|
||||
self.figures: list[StyledFigure] = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue