From 78df632375345bbb124810a6cc2da3602c448c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 1 Feb 2019 13:48:41 +0100 Subject: [PATCH] buildings-type: military buildings - interpret buildings with building=yes and military=* as building=military, military=* - for military buildings, write type in brackets (e.g. "Military (Barracks)") --- buildings-type.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/buildings-type.json b/buildings-type.json index d8846fc..2fa2ff0 100644 --- a/buildings-type.json +++ b/buildings-type.json @@ -12,6 +12,7 @@ "feature": { "pre": [ "{% set type = tags.building|split(';')[0] %}", + "{% if tags.military %}{% set type = 'military' %}{% endif %}", "{% set color = const.other.color %}", "{% for cat, data in const %}", " {% if type in data.types %}", @@ -20,13 +21,18 @@ "{% endfor %}" ], "description": [ - "{% if tags.building == 'yes' %}", + "{% if tags.building == 'yes' and tags.military %}", + "{{ tagTrans('building', 'military') }}", + "{% elseif tags.building == 'yes' %}", "{{ keyTrans('building') }}", "{% else %}", "{{ tagTransList('building', tags.building) }}", "{% endif %}", "{% if tags.building == 'construction' and tags.construction %}", "({{ tagTransList('building', tags.construction) }})", + "{% endif %}", + "{% if tags.building in [ 'yes', 'military' ] and tags.military %}", + "({{ tagTransList('military', tags.military) }})", "{% endif %}" ], "markerSymbol": "", @@ -213,10 +219,11 @@ ] }, "military": { - "name": "tag:military", + "name": "tag:building=military", "color": "#4a7300", "types": [ - "bunker" + "bunker", + "military" ] }, "unspecified": {