mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-10 23:01:53 +02:00
Merge main.
This commit is contained in:
commit
a7b3c707cf
12 changed files with 378 additions and 90 deletions
|
@ -125,6 +125,8 @@ class Map:
|
|||
|
||||
def draw_buildings(self, constructor: Constructor) -> None:
|
||||
"""Draw buildings: shade, walls, and roof."""
|
||||
if self.configuration.building_mode == BuildingMode.NO:
|
||||
return
|
||||
if self.configuration.building_mode == BuildingMode.FLAT:
|
||||
for building in constructor.buildings:
|
||||
building.draw(self.svg, self.flinger)
|
||||
|
@ -146,9 +148,10 @@ class Map:
|
|||
continue
|
||||
building.draw_walls(self.svg, height, previous_height, scale)
|
||||
|
||||
for building in constructor.buildings:
|
||||
if building.height == height:
|
||||
building.draw_roof(self.svg, self.flinger, scale)
|
||||
if self.configuration.draw_roofs:
|
||||
for building in constructor.buildings:
|
||||
if building.height == height:
|
||||
building.draw_roof(self.svg, self.flinger, scale)
|
||||
|
||||
previous_height = height
|
||||
|
||||
|
@ -191,7 +194,7 @@ def ui(arguments: argparse.Namespace) -> None:
|
|||
:param arguments: command-line arguments
|
||||
"""
|
||||
configuration: MapConfiguration = MapConfiguration.from_options(
|
||||
arguments, int(arguments.zoom)
|
||||
arguments, float(arguments.zoom)
|
||||
)
|
||||
cache_path: Path = Path(arguments.cache)
|
||||
cache_path.mkdir(parents=True, exist_ok=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue