| 
									
										
										
										
											2023-11-18 12:29:35 -06:00
										 |  |  | {% extends "multitracker.html" %} | 
					
						
							| 
									
										
										
										
											2023-10-08 11:30:34 +02:00
										 |  |  | {# establish the to be tracked data. Display Name, factorio/AP internal name, display image #} | 
					
						
							|  |  |  | {%- set science_packs = [ | 
					
						
							|  |  |  |     ("Logistic Science Pack", "logistic-science-pack", | 
					
						
							|  |  |  |     "https://wiki.factorio.com/images/thumb/Logistic_science_pack.png/32px-Logistic_science_pack.png"), | 
					
						
							|  |  |  |     ("Military Science Pack", "military-science-pack", | 
					
						
							|  |  |  |     "https://wiki.factorio.com/images/thumb/Military_science_pack.png/32px-Military_science_pack.png"), | 
					
						
							|  |  |  |     ("Chemical Science Pack", "chemical-science-pack", | 
					
						
							|  |  |  |     "https://wiki.factorio.com/images/thumb/Chemical_science_pack.png/32px-Chemical_science_pack.png"), | 
					
						
							|  |  |  |     ("Production Science Pack", "production-science-pack", | 
					
						
							|  |  |  |     "https://wiki.factorio.com/images/thumb/Production_science_pack.png/32px-Production_science_pack.png"), | 
					
						
							|  |  |  |     ("Utility Science Pack", "utility-science-pack", | 
					
						
							|  |  |  |     "https://wiki.factorio.com/images/thumb/Utility_science_pack.png/32px-Utility_science_pack.png"), | 
					
						
							|  |  |  |     ("Space Science Pack", "space-science-pack", | 
					
						
							|  |  |  |     "https://wiki.factorio.com/images/thumb/Space_science_pack.png/32px-Space_science_pack.png"), | 
					
						
							|  |  |  | ] -%} | 
					
						
							| 
									
										
										
										
											2023-11-18 12:29:35 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-08 11:30:34 +02:00
										 |  |  | {%- block custom_table_headers %} | 
					
						
							|  |  |  | {#- macro that creates a table header with display name and image -#} | 
					
						
							|  |  |  | {%- macro make_header(name, img_src) %} | 
					
						
							| 
									
										
										
										
											2023-03-12 12:38:13 +01:00
										 |  |  | <th class="center-column"> | 
					
						
							| 
									
										
										
										
											2023-11-18 12:29:35 -06:00
										 |  |  |     <img class="icon-sprite" src="{{ img_src }}" alt="{{ name }}" title="{{ name }}" /> | 
					
						
							| 
									
										
										
										
											2023-03-12 12:38:13 +01:00
										 |  |  | </th> | 
					
						
							| 
									
										
										
										
											2023-10-08 11:30:34 +02:00
										 |  |  | {% endmacro -%} | 
					
						
							|  |  |  | {#- call the macro to build the table header -#} | 
					
						
							|  |  |  | {%- for name, internal_name, img_src in science_packs %} | 
					
						
							|  |  |  |     {{ make_header(name, img_src) }} | 
					
						
							|  |  |  | {% endfor -%} | 
					
						
							| 
									
										
										
										
											2023-03-12 12:38:13 +01:00
										 |  |  | {% endblock %} | 
					
						
							| 
									
										
										
										
											2023-11-18 12:29:35 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-12 12:38:13 +01:00
										 |  |  | {% block custom_table_row scoped  %} | 
					
						
							| 
									
										
										
										
											2023-11-18 12:29:35 -06:00
										 |  |  |     {%- set player_inventory = inventories[(team, player)] -%} | 
					
						
							| 
									
										
										
										
											2023-10-08 11:30:34 +02:00
										 |  |  |     {%- set prog_science = player_inventory["progressive-science-pack"] -%} | 
					
						
							|  |  |  |     {%- for name, internal_name, img_src in science_packs %} | 
					
						
							| 
									
										
										
										
											2023-11-18 12:29:35 -06:00
										 |  |  |         {% if player_inventory[internal_name] or prog_science > loop.index0 %} | 
					
						
							|  |  |  |             <td class="center-column item-acquired">✔️</td> | 
					
						
							|  |  |  |         {% else %} | 
					
						
							|  |  |  |             <td class="center-column"></td> | 
					
						
							|  |  |  |         {% endif %} | 
					
						
							| 
									
										
										
										
											2023-10-08 11:30:34 +02:00
										 |  |  |     {% endfor -%} | 
					
						
							| 
									
										
										
										
											2023-03-12 12:38:13 +01:00
										 |  |  | {% endblock%} |