mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
fix downloading and displaying patches for seeds/rooms with teams
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
{% if room.last_port %}
|
||||
You can connect to this room by using '/connect archipelago.gg:{{ room.last_port }}'
|
||||
in the <a href="https://github.com/Berserker66/MultiWorld-Utilities/releases">client</a>.<br>{% endif %}
|
||||
{{ macros.list_patches_room(room.seed.patches, room) }}
|
||||
{{ macros.list_patches_room(room) }}
|
||||
{% if room.owner == session["_id"] %}
|
||||
<form method=post>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
{{ caller() }}
|
||||
</ul>
|
||||
{%- endmacro %}
|
||||
{% macro list_patches_room(patches, room) %}
|
||||
{% if patches %}
|
||||
{% macro list_patches_room(room) %}
|
||||
{% if room.seed.patches %}
|
||||
<ul>
|
||||
{% for patch in patches|list|sort(attribute="player") %}
|
||||
<li><a href="{{ url_for("download_patch", patch_id=patch.id, room_id=room.id) }}">
|
||||
Patch for player {{ patch.player }} - {{ room.seed.multidata["names"][0][patch.player-1] }}</a></li>
|
||||
{% for patch in room.seed.patches|list|sort(attribute="team,player") %}
|
||||
<li><a href="{{ url_for("download_patch", team = patch.team, patch_id=patch.id, room_id=room.id) }}">
|
||||
Patch for team {{ patch.team+1 }} player {{ patch.player }}
|
||||
- {{ room.seed.multidata["names"][patch.team][patch.player-1] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
@@ -33,26 +33,27 @@
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if seed.multidata %}
|
||||
<tr>
|
||||
<td>Players: </td>
|
||||
<td>
|
||||
<ul>
|
||||
{% for team in seed.multidata["names"] %}
|
||||
<li>Team #{{ loop.index }} - {{ team | length }}
|
||||
<ul>
|
||||
{% for player in team %}
|
||||
<li>
|
||||
<a href="{{ url_for("download_raw_patch", seed_id=seed.id, player_id=loop.index) }}">{{ player }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rooms: </td>
|
||||
<tr>
|
||||
<td>Players: </td>
|
||||
<td>
|
||||
<ul>
|
||||
{% for team in seed.multidata["names"] %}
|
||||
{% set outer_loop = loop %}
|
||||
<li>Team #{{ loop.index }} - {{ team | length }}
|
||||
<ul>
|
||||
{% for player in team %}
|
||||
<li>
|
||||
<a href="{{ url_for("download_raw_patch", seed_id=seed.id, player_id=loop.index, team_id=outer_loop.index0) }}">{{ player }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rooms: </td>
|
||||
<td>
|
||||
{% call macros.list_rooms(rooms) %}
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user