mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-22 13:36:26 +02:00
Issue #84: add primitive road connections.
This commit is contained in:
parent
b46e65f2ec
commit
aa82353f00
6 changed files with 258 additions and 150 deletions
|
@ -15,10 +15,10 @@ from map_machine.figure import (
|
|||
Building,
|
||||
Crater,
|
||||
DirectionSector,
|
||||
Road,
|
||||
StyledFigure,
|
||||
Tree,
|
||||
)
|
||||
from map_machine.road import Road, Roads
|
||||
from map_machine.flinger import Flinger
|
||||
from map_machine.icon import (
|
||||
DEFAULT_SMALL_SHAPE_ID,
|
||||
|
@ -185,7 +185,7 @@ class Constructor:
|
|||
self.points: list[Point] = []
|
||||
self.figures: list[StyledFigure] = []
|
||||
self.buildings: list[Building] = []
|
||||
self.roads: list[Road] = []
|
||||
self.roads: Roads = Roads()
|
||||
self.trees: list[Tree] = []
|
||||
self.craters: list[Crater] = []
|
||||
self.direction_sectors: list[DirectionSector] = []
|
||||
|
@ -260,7 +260,9 @@ class Constructor:
|
|||
|
||||
road_matcher: RoadMatcher = self.scheme.get_road(line.tags)
|
||||
if road_matcher:
|
||||
self.roads.append(Road(line.tags, inners, outers, road_matcher))
|
||||
self.roads.append(
|
||||
Road(line.tags, outers[0], road_matcher, self.flinger)
|
||||
)
|
||||
return
|
||||
|
||||
processed: set[str] = set()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue