A Wiki in the Desert
Log in

Difference between revisions of "Template:RequireTable"

From A Wiki in the Desert
(Undo revision 162473 by Omegaice (talk))
Tag: Undo
(Undo revision 162472 by Omegaice (talk))
Tag: Undo
Line 12: Line 12:
 
}}}}
 
}}}}
 
}}
 
}}
{| class="smwtable-clean sortable"  
+
<table class="smwtable-clean sortable">
! Building !! Count {{#ifeq: {{#var: isComplex}} | true | !! Properties}}
+
<tr><th>Building</th><th>Count</th>{{#ifeq: {{#var: isComplex}} | true | <th>Properties</th>}}
|-
 
 
{{#loop: i
 
{{#loop: i
 
   | 0
 
   | 0
Line 25: Line 24:
 
   }}}}
 
   }}}}
 
    
 
    
   {{#arrayprint:requirements
+
   {{#loop: j
     |<br/>
+
     | 0
     | @@@@
+
     | {{ #arraysize:requirements }}
     |  
+
     |
     {{!}}[[{{ #arrayindex: buildings | {{ #var:i }} }}]]
+
     <tr>
    {{!}} style="text-align: center" {{!}} {{#show: @@@@ | ?count# }}
+
      <td>[[{{ #arrayindex: buildings | {{ #var:i }} }}]]</td>
    {{#ifeq: {{#var: isComplex}} | true | {{!}} style="text-align: center" {{!}} {{#show: @@@@ | ?requires_property# }}}}
+
      <td>{{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?count#= |mainlabel=- }}</td>
     {{!}}-
+
      {{#ifeq: {{#var: isComplex}} | true | <td>{{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?requires_property#= |mainlabel=- }}</td>}}
 +
     </tr>
 
   }}
 
   }}
 
}}
 
}}
|}
+
</table>

Revision as of 11:58, 5 May 2021


BuildingCount