From 67ae86882a64f029eef90f23b3667e920ac3e50f Mon Sep 17 00:00:00 2001 From: Lev Dragunov Date: Thu, 16 Feb 2017 15:29:24 +0300 Subject: [PATCH] Conditional oneway restrictions --- profiles/lib/handlers.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/profiles/lib/handlers.lua b/profiles/lib/handlers.lua index 33c6d52e6..86881274b 100644 --- a/profiles/lib/handlers.lua +++ b/profiles/lib/handlers.lua @@ -397,6 +397,11 @@ function Handlers.handle_oneway(way,result,data,profile) oneway = Tags.get_value_by_prefixed_sequence(way,profile.restrictions,'oneway') or way:get_value_by_key("oneway") elseif profile.oneway_handling == 'specific' then oneway = Tags.get_value_by_prefixed_sequence(way,profile.restrictions,'oneway') + elseif profile.oneway_handling == 'conditional' then + oneway = Tags.get_value_by_prefixed_sequence(way,profile.restrictions,'oneway') or way:get_value_by_key("oneway") + if way:get_value_by_key("oneway:conditional") then + oneway = "no" + end end data.oneway = oneway