From 8451d9b5d3f56dd1114ecdebb88c75c0b18da238 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@cg.tuwien.ac.at>
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": {