{# Map Accordion Content Shows discovered locations grouped by region #} {% if discovered_locations %} {# Group locations by region #} {% set regions = {} %} {% for loc in discovered_locations %} {% set region = loc.region %} {% if region not in regions %} {% set _ = regions.update({region: []}) %} {% endif %} {% set _ = regions[region].append(loc) %} {% endfor %} {% for region_name, locations in regions.items() %}
{{ region_name }}
{% for loc in locations %}
{% if loc.location_type == 'town' %}🏘️ {% elif loc.location_type == 'tavern' %}🍺 {% elif loc.location_type == 'wilderness' %}🌲 {% elif loc.location_type == 'dungeon' %}⚔️ {% elif loc.location_type == 'ruins' %}🏚️ {% else %}📍 {% endif %} {{ loc.name }} {% if loc.is_current %}(here){% else %}{{ loc.location_type }}{% endif %}
{% endfor %}
{% endfor %} {% else %}
No locations discovered yet.
{% endif %}