206 lines
		
	
	
		
			15 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			206 lines
		
	
	
		
			15 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
|   | {% extends "multitracker.html" %} | ||
|  | {% block head %} | ||
|  |     {{ super() }} | ||
|  |     <script type="application/ecmascript" src="{{ url_for("static", filename="assets/jquery.scrollsync.js") }}"></script> | ||
|  |     <script type="application/ecmascript" src="{{ url_for("static", filename="assets/lttpMultiTracker.js") }}"></script> | ||
|  | {% endblock %} | ||
|  | 
 | ||
|  | {# List all tracker-relevant icons. Format: (Name, Image URL) #} | ||
|  | {%- set icons = { | ||
|  |     "Blue Shield": "https://www.zeldadungeon.net/wiki/images/8/85/Fighters-Shield.png", | ||
|  |     "Red Shield": "https://www.zeldadungeon.net/wiki/images/5/55/Fire-Shield.png", | ||
|  |     "Mirror Shield": "https://www.zeldadungeon.net/wiki/images/8/84/Mirror-Shield.png", | ||
|  |     "Fighter Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/4/40/SFighterSword.png?width=1920", | ||
|  |     "Master Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/6/65/SMasterSword.png?width=1920", | ||
|  |     "Tempered Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/9/92/STemperedSword.png?width=1920", | ||
|  |     "Golden Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/2/28/SGoldenSword.png?width=1920", | ||
|  |     "Bow": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Bow_%26_Arrows_Sprite.png?version=5f85a70e6366bf473544ef93b274f74c", | ||
|  |     "Silver Bow": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/6/65/Bow.png?width=1920", | ||
|  |     "Green Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c9/SGreenTunic.png?width=1920", | ||
|  |     "Blue Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/9/98/SBlueTunic.png?width=1920", | ||
|  |     "Red Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/7/74/SRedTunic.png?width=1920", | ||
|  |     "Power Glove": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/f/f5/SPowerGlove.png?width=1920", | ||
|  |     "Titan Mitts": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c1/STitanMitt.png?width=1920", | ||
|  |     "Progressive Sword": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/cc/ALttP_Master_Sword_Sprite.png?version=55869db2a20e157cd3b5c8f556097725", | ||
|  |     "Pegasus Boots": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ed/ALttP_Pegasus_Shoes_Sprite.png?version=405f42f97240c9dcd2b71ffc4bebc7f9", | ||
|  |     "Progressive Glove": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c1/STitanMitt.png?width=1920", | ||
|  |     "Flippers": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/4/4c/ZoraFlippers.png?width=1920", | ||
|  |     "Moon Pearl": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Moon_Pearl_Sprite.png?version=d601542d5abcc3e006ee163254bea77e", | ||
|  |     "Progressive Bow": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Bow_%26_Arrows_Sprite.png?version=cfb7648b3714cccc80e2b17b2adf00ed", | ||
|  |     "Blue Boomerang": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/c3/ALttP_Boomerang_Sprite.png?version=96127d163759395eb510b81a556d500e", | ||
|  |     "Red Boomerang": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/b9/ALttP_Magical_Boomerang_Sprite.png?version=47cddce7a07bc3e4c2c10727b491f400", | ||
|  |     "Hookshot": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/24/Hookshot.png?version=c90bc8e07a52e8090377bd6ef854c18b", | ||
|  |     "Mushroom": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/35/ALttP_Mushroom_Sprite.png?version=1f1acb30d71bd96b60a3491e54bbfe59", | ||
|  |     "Magic Powder": "https://www.zeldadungeon.net/wiki/images/thumb/6/62/MagicPowder-ALttP-Sprite.png/86px-MagicPowder-ALttP-Sprite.png", | ||
|  |     "Fire Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d6/FireRod.png?version=6eabc9f24d25697e2c4cd43ddc8207c0", | ||
|  |     "Ice Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d7/ALttP_Ice_Rod_Sprite.png?version=1f944148223d91cfc6a615c92286c3bc", | ||
|  |     "Bombos": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/8c/ALttP_Bombos_Medallion_Sprite.png?version=f4d6aba47fb69375e090178f0fc33b26", | ||
|  |     "Ether": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/3c/Ether.png?version=34027651a5565fcc5a83189178ab17b5", | ||
|  |     "Quake": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/56/ALttP_Quake_Medallion_Sprite.png?version=efd64d451b1831bd59f7b7d6b61b5879", | ||
|  |     "Lamp": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Lantern_Sprite.png?version=e76eaa1ec509c9a5efb2916698d5a4ce", | ||
|  |     "Hammer": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d1/ALttP_Hammer_Sprite.png?version=e0adec227193818dcaedf587eba34500", | ||
|  |     "Shovel": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/c4/ALttP_Shovel_Sprite.png?version=e73d1ce0115c2c70eaca15b014bd6f05", | ||
|  |     "Flute": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/db/Flute.png?version=ec4982b31c56da2c0c010905c5c60390", | ||
|  |     "Bug Catching Net": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/54/Bug-CatchingNet.png?version=4d40e0ee015b687ff75b333b968d8be6", | ||
|  |     "Book of Mudora": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/22/ALttP_Book_of_Mudora_Sprite.png?version=11e4632bba54f6b9bf921df06ac93744", | ||
|  |     "Bottle": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ef/ALttP_Magic_Bottle_Sprite.png?version=fd98ab04db775270cbe79fce0235777b", | ||
|  |     "Cane of Somaria": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e1/ALttP_Cane_of_Somaria_Sprite.png?version=8cc1900dfd887890badffc903bb87943", | ||
|  |     "Cane of Byrna": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Cane_of_Byrna_Sprite.png?version=758b607c8cbe2cf1900d42a0b3d0fb54", | ||
|  |     "Cape": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/1/1c/ALttP_Magic_Cape_Sprite.png?version=6b77f0d609aab0c751307fc124736832", | ||
|  |     "Magic Mirror": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e5/ALttP_Magic_Mirror_Sprite.png?version=e035dbc9cbe2a3bd44aa6d047762b0cc", | ||
|  |     "Triforce": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/4/4e/TriforceALttPTitle.png?version=dc398e1293177581c16303e4f9d12a48", | ||
|  |     "Triforce Piece": "https://www.zeldadungeon.net/wiki/images/thumb/5/54/Triforce_Fragment_-_BS_Zelda.png/62px-Triforce_Fragment_-_BS_Zelda.png", | ||
|  |     "Small Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/f/f1/ALttP_Small_Key_Sprite.png?version=4f35d92842f0de39d969181eea03774e", | ||
|  |     "Big Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/33/ALttP_Big_Key_Sprite.png?version=136dfa418ba76c8b4e270f466fc12f4d", | ||
|  |     "Chest": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/7/73/ALttP_Treasure_Chest_Sprite.png?version=5f530ecd98dcb22251e146e8049c0dda", | ||
|  |     "Light World": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e7/ALttP_Soldier_Green_Sprite.png?version=d650d417934cd707a47e496489c268a6", | ||
|  |     "Dark World": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/9/94/ALttP_Moblin_Sprite.png?version=ebf50e33f4657c377d1606bcc0886ddc", | ||
|  |     "Hyrule Castle": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d3/ALttP_Ball_and_Chain_Trooper_Sprite.png?version=1768a87c06d29cc8e7ddd80b9fa516be", | ||
|  |     "Agahnims Tower": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/1/1e/ALttP_Agahnim_Sprite.png?version=365956e61b0c2191eae4eddbe591dab5", | ||
|  |     "Desert Palace": "https://www.zeldadungeon.net/wiki/images/2/25/Lanmola-ALTTP-Sprite.png", | ||
|  |     "Eastern Palace": "https://www.zeldadungeon.net/wiki/images/d/dc/RedArmosKnight.png", | ||
|  |     "Tower of Hera": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/3c/ALttP_Moldorm_Sprite.png?version=c588257bdc2543468e008a6b30f262a7", | ||
|  |     "Palace of Darkness": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ed/ALttP_Helmasaur_King_Sprite.png?version=ab8a4a1cfd91d4fc43466c56cba30022", | ||
|  |     "Swamp Palace": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/7/73/ALttP_Arrghus_Sprite.png?version=b098be3122e53f751b74f4a5ef9184b5", | ||
|  |     "Skull Woods": "https://alttp-wiki.net/images/6/6a/Mothula.png", | ||
|  |     "Thieves Town": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/86/ALttP_Blind_the_Thief_Sprite.png?version=3833021bfcd112be54e7390679047222", | ||
|  |     "Ice Palace": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/33/ALttP_Kholdstare_Sprite.png?version=e5a1b0e8b2298e550d85f90bf97045c0", | ||
|  |     "Misery Mire": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/85/ALttP_Vitreous_Sprite.png?version=92b2e9cb0aa63f831760f08041d8d8d8", | ||
|  |     "Turtle Rock": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/9/91/ALttP_Trinexx_Sprite.png?version=0cc867d513952aa03edd155597a0c0be", | ||
|  |     "Ganons Tower": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/b9/ALttP_Ganon_Sprite.png?version=956f51f054954dfff53c1a9d4f929c74", | ||
|  | } -%} | ||
|  | 
 | ||
|  | {%- block custom_table_headers %} | ||
|  | {#- macro that creates a table header with display name and image -#} | ||
|  | {%- macro make_header(name, img_src) %} | ||
|  |     <th class="center-column"> | ||
|  |         <img height="24" src="{{ img_src }}" title="{{ name }}" alt="{{ name }}" /> | ||
|  |     </th> | ||
|  | {% endmacro -%} | ||
|  | 
 | ||
|  | {#- call the macro to build the table header -#} | ||
|  | {%- for name in tracking_names %} | ||
|  |     {%- if name in icons -%} | ||
|  |         <th class="center-column"> | ||
|  |             <img class="icon-sprite" src="{{ icons[name] }}" alt="{{ name | e }}" title="{{ name | e }}" /> | ||
|  |         </th> | ||
|  |     {%- endif %} | ||
|  | {% endfor -%} | ||
|  | {% endblock %} | ||
|  | 
 | ||
|  | {# build each row of custom entries #} | ||
|  | {% block custom_table_row scoped %} | ||
|  |     {%- for id in tracking_ids -%} | ||
|  | {#        {{ checks }}#} | ||
|  |         {%- if inventories[(team, player)][id] -%} | ||
|  |             <td class="center-column item-acquired"> | ||
|  |                 {% if id in multi_items %}{{ inventories[(team, player)][id] }}{% else %}✔️{% endif %} | ||
|  |             </td> | ||
|  |         {%- else -%} | ||
|  |             <td></td> | ||
|  |         {%- endif -%} | ||
|  |     {% endfor %} | ||
|  | {% endblock %} | ||
|  | 
 | ||
|  | {% block custom_tables %} | ||
|  | 
 | ||
|  | {% for team, _ in total_team_locations.items() %} | ||
|  | <div class="table-wrapper"> | ||
|  |     <table id="area-table" class="table non-unique-item-table"> | ||
|  |         <thead> | ||
|  |             <tr> | ||
|  |                 <th rowspan="2">#</th> | ||
|  |                 <th rowspan="2">Name</th> | ||
|  |                 {% for area in ordered_areas %} | ||
|  |                     {% set colspan = 1 %} | ||
|  |                     {% if area in key_locations %} | ||
|  |                     {% set colspan = colspan + 1 %} | ||
|  |                     {% endif %} | ||
|  |                     {% if area in big_key_locations %} | ||
|  |                     {% set colspan = colspan + 1 %} | ||
|  |                     {% endif %} | ||
|  |                     {% if area in icons %} | ||
|  |                         <th colspan="{{ colspan }}" class="center-column upper-row"> | ||
|  |                             <img class="icon-sprite" src="{{ icons[area] }}" alt="{{ area }}" title="{{ area }}"></th> | ||
|  |                     {%- else -%} | ||
|  |                         <th colspan="{{ colspan }}" class="center-column">{{ area }}</th> | ||
|  |                     {%- endif -%} | ||
|  |                 {%- endfor -%} | ||
|  |                 <th rowspan="2" class="center-column">%</th> | ||
|  |                 <th rowspan="2" class="center-column hours">Last<br>Activity</th> | ||
|  |             </tr> | ||
|  |             <tr> | ||
|  |                 {% for area in ordered_areas %} | ||
|  |                     <th class="center-column lower-row fraction"> | ||
|  |                         <img class="icon-sprite" src="{{ icons["Chest"] }}" alt="Checks" title="Checks Complete"> | ||
|  |                     </th> | ||
|  |                     {% if area in key_locations %} | ||
|  |                         <th class="center-column lower-row number"> | ||
|  |                             <img class="icon-sprite" src="{{ icons["Small Key"] }}" alt="Small Key" title="Small Keys"> | ||
|  |                         </th> | ||
|  |                     {% endif %} | ||
|  |                     {% if area in big_key_locations %} | ||
|  |                         <th class="center-column lower-row number"> | ||
|  |                             <img class="icon-sprite" src="{{ icons["Big Key"] }}" alt="Big Key" title="Big Keys"> | ||
|  |                         </th> | ||
|  |                     {%- endif -%} | ||
|  |                 {%- endfor -%} | ||
|  |             </tr> | ||
|  |         </thead> | ||
|  |         <tbody> | ||
|  |         {%- for (checks_team, player), area_checks in checks_done.items() if games[(team, player)] == current_tracker and team == checks_team -%} | ||
|  |             <tr> | ||
|  |                 <td><a href="{{ url_for("get_player_tracker", tracker=room.tracker, | ||
|  |                 tracked_team=team, tracked_player=player)}}">{{ player }}</a></td> | ||
|  |                 <td>{{ player_names_with_alias[(team, player)] | e }}</td> | ||
|  |                 {%- for area in ordered_areas -%} | ||
|  |                     {% if (team, player) in checks_in_area and area in checks_in_area[(team, player)] %} | ||
|  |                         {%- set checks_done = area_checks[area] -%} | ||
|  |                         {%- set checks_total = checks_in_area[(team, player)][area] -%} | ||
|  |                         {%- if checks_done == checks_total -%} | ||
|  |                             <td class="item-acquired center-column"> | ||
|  |                                 {{ checks_done }}/{{ checks_total }}</td> | ||
|  |                         {%- else -%} | ||
|  |                             <td class="center-column">{{ checks_done }}/{{ checks_total }}</td> | ||
|  |                         {%- endif -%} | ||
|  |                         {%- if area in key_locations -%} | ||
|  |                             <td class="center-column">{{ inventories[(team, player)][small_key_ids[area]] }}</td> | ||
|  |                         {%- endif -%} | ||
|  |                         {%- if area in big_key_locations -%} | ||
|  |                             <td class="center-column">{% if inventories[(team, player)][big_key_ids[area]] %}✔️{% endif %}</td> | ||
|  |                         {%- endif -%} | ||
|  |                     {% else %} | ||
|  |                         <td class="center-column"></td> | ||
|  |                         {%- if area in key_locations -%} | ||
|  |                             <td class="center-column"></td> | ||
|  |                         {%- endif -%} | ||
|  |                         {%- if area in big_key_locations -%} | ||
|  |                             <td class="center-column"></td> | ||
|  |                         {%- endif -%} | ||
|  |                     {% endif %} | ||
|  |                 {%- endfor -%} | ||
|  | 
 | ||
|  |                 <td class="center-column"> | ||
|  |                 {% set location_count = locations[(team, player)] | length %} | ||
|  |                 {%- if locations[(team, player)] | length > 0 -%} | ||
|  |                     {% set percentage_of_completion = locations_complete[(team, player)] / location_count * 100 %} | ||
|  |                     {{ "{0:.2f}".format(percentage_of_completion) }} | ||
|  |                 {%- else -%} | ||
|  |                     100.00 | ||
|  |                 {%- endif -%} | ||
|  |                 </td> | ||
|  | 
 | ||
|  |                 {%- if activity_timers[(team, player)] -%} | ||
|  |                     <td class="center-column">{{ activity_timers[(team, player)].total_seconds() }}</td> | ||
|  |                 {%- else -%} | ||
|  |                     <td class="center-column">None</td> | ||
|  |                 {%- endif -%} | ||
|  |             </tr> | ||
|  |         {%- endfor -%} | ||
|  |         </tbody> | ||
|  |     </table> | ||
|  | </div> | ||
|  | {% endfor %} | ||
|  | 
 | ||
|  | {% endblock %} |