Take stop signs into account during routing

This commit is contained in:
Siarhei Fedartsou
2022-10-28 22:04:02 +02:00
parent 72ea34f3b7
commit 36f3a5eec8
20 changed files with 132 additions and 189 deletions
+4 -6
View File
@@ -6,17 +6,15 @@ function GiveWay.get_value(node)
local direction = node:get_value_by_key("direction")
if direction then
if "forward" == direction then
return give_way.direction_forward
return traffic_flow_control_direction.direction_forward
end
if "backward" == direction then
return give_way.direction_reverse
return traffic_flow_control_direction.direction_reverse
end
end
-- return give_way.direction_all
return true
return traffic_flow_control_direction.direction_all
end
-- return give_way.none
return false
return traffic_flow_control_direction.none
end
return GiveWay
+4 -4
View File
@@ -6,15 +6,15 @@ function StopSign.get_value(node)
local direction = node:get_value_by_key("direction")
if direction then
if "forward" == direction then
return stop_sign.direction_forward
return traffic_flow_control_direction.direction_forward
end
if "backward" == direction then
return stop_sign.direction_reverse
return traffic_flow_control_direction.direction_reverse
end
end
return stop_sign.direction_all
return traffic_flow_control_direction.direction_all
end
return stop_sign.none
return traffic_flow_control_direction.none
end
return StopSign