Tracker: Only show AT and HC big key in DoorRando
This commit is contained in:
parent
4b155677fa
commit
611a38be67
|
@ -112,14 +112,14 @@
|
||||||
<th rowspan="2">#</th>
|
<th rowspan="2">#</th>
|
||||||
<th rowspan="2">Name</th>
|
<th rowspan="2">Name</th>
|
||||||
{% for area in ordered_areas %}
|
{% for area in ordered_areas %}
|
||||||
{% set colspan = (3 if area in key_locations else 1) %}
|
{% set colspan = 1 %}
|
||||||
{% if area in icons %}
|
{% if area in key_locations %}
|
||||||
<th colspan="{{ colspan }}" style="text-align: center"><img class="alttp-sprite"
|
{% set colspan = colspan + 1 %}
|
||||||
src="{{ icons[area] }}"
|
|
||||||
alt="{{ area }}"></th>
|
|
||||||
{% else %}
|
|
||||||
<th colspan="{{ colspan }}">{{ area }}</th>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if area in big_key_locations %}
|
||||||
|
{% set colspan = colspan + 1 %}
|
||||||
|
{% endif %}
|
||||||
|
<th colspan="{{ colspan }}">{{ area }}</th>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<th rowspan="2">Last Activity</th>
|
<th rowspan="2">Last Activity</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -130,6 +130,8 @@
|
||||||
{% if area in key_locations %}
|
{% if area in key_locations %}
|
||||||
<th style="text-align: center"><img class="alttp-sprite"
|
<th style="text-align: center"><img class="alttp-sprite"
|
||||||
src="{{ icons["Small Key"] }}" alt="Small Key"></th>
|
src="{{ icons["Small Key"] }}" alt="Small Key"></th>
|
||||||
|
{% endif %}
|
||||||
|
{% if area in big_key_locations %}
|
||||||
<th style="text-align: center"><img class="alttp-sprite"
|
<th style="text-align: center"><img class="alttp-sprite"
|
||||||
src="{{ icons["Big Key"] }}" alt="Big Key"></th>
|
src="{{ icons["Big Key"] }}" alt="Big Key"></th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -152,6 +154,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if area in key_locations %}
|
{% if area in key_locations %}
|
||||||
<td>{{ inventory[team][player][small_key_ids[area]] }}</td>
|
<td>{{ inventory[team][player][small_key_ids[area]] }}</td>
|
||||||
|
{% endif %}
|
||||||
|
{% if area in big_key_locations %}
|
||||||
<td>{% if inventory[team][player][big_key_ids[area]] %}✔️{% endif %}</td>
|
<td>{% if inventory[team][player][big_key_ids[area]] %}✔️{% endif %}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -148,6 +148,8 @@ key_locations = {"Desert Palace", "Eastern Palace", "Hyrule Castle", "Agahnims T
|
||||||
"Thieves Town", "Skull Woods", "Ice Palace", "Misery Mire", "Turtle Rock", "Palace of Darkness",
|
"Thieves Town", "Skull Woods", "Ice Palace", "Misery Mire", "Turtle Rock", "Palace of Darkness",
|
||||||
"Ganons Tower"}
|
"Ganons Tower"}
|
||||||
|
|
||||||
|
big_key_locations = {"Desert Palace", "Eastern Palace", "Tower of Hera", "Swamp Palace", "Thieves Town", "Skull Woods",
|
||||||
|
"Ice Palace", "Misery Mire", "Turtle Rock", "Palace of Darkness", "Ganons Tower"}
|
||||||
location_to_area = {}
|
location_to_area = {}
|
||||||
for area, locations in default_locations.items():
|
for area, locations in default_locations.items():
|
||||||
for location in locations:
|
for location in locations:
|
||||||
|
@ -206,8 +208,13 @@ def get_static_room_data(room: Room):
|
||||||
# in > 100 players this can take a bit of time and is the main reason for the cache
|
# in > 100 players this can take a bit of time and is the main reason for the cache
|
||||||
locations = {tuple(k): tuple(v) for k, v in multidata['locations']}
|
locations = {tuple(k): tuple(v) for k, v in multidata['locations']}
|
||||||
names = multidata["names"]
|
names = multidata["names"]
|
||||||
_multidata_cache[room.seed.id] = locations, names
|
|
||||||
return locations, names
|
use_door_tracker = False
|
||||||
|
if "tags" in multidata:
|
||||||
|
use_door_tracker = "DR" in multidata.tags
|
||||||
|
result = locations, names, use_door_tracker
|
||||||
|
_multidata_cache[room.seed.id] = result
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
@app.route('/tracker/<uuid:tracker>')
|
@app.route('/tracker/<uuid:tracker>')
|
||||||
|
@ -216,7 +223,7 @@ def get_tracker(tracker: UUID):
|
||||||
room = Room.get(tracker=tracker)
|
room = Room.get(tracker=tracker)
|
||||||
if not room:
|
if not room:
|
||||||
abort(404)
|
abort(404)
|
||||||
locations, names = get_static_room_data(room)
|
locations, names, use_door_tracker = get_static_room_data(room)
|
||||||
|
|
||||||
inventory = {teamnumber: {playernumber: collections.Counter() for playernumber in range(1, len(team) + 1)}
|
inventory = {teamnumber: {playernumber: collections.Counter() for playernumber in range(1, len(team) + 1)}
|
||||||
for teamnumber, team in enumerate(names)}
|
for teamnumber, team in enumerate(names)}
|
||||||
|
@ -264,4 +271,4 @@ def get_tracker(tracker: UUID):
|
||||||
multi_items=multi_items, checks_done=checks_done, ordered_areas=ordered_areas,
|
multi_items=multi_items, checks_done=checks_done, ordered_areas=ordered_areas,
|
||||||
checks_in_area=checks_in_area, activity_timers=activity_timers,
|
checks_in_area=checks_in_area, activity_timers=activity_timers,
|
||||||
key_locations=key_locations, small_key_ids=small_key_ids, big_key_ids=big_key_ids,
|
key_locations=key_locations, small_key_ids=small_key_ids, big_key_ids=big_key_ids,
|
||||||
video=video)
|
video=video, big_key_locations = key_locations if use_door_tracker else big_key_locations)
|
||||||
|
|
Loading…
Reference in New Issue