A Wiki in the Desert
Log in

Difference between revisions of "Template:RequireTable"

From A Wiki in the Desert
(Test to try and reduce complexity.)
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine:isComplex|{{#switch: {{FULLPAGENAME}} | Treated Boards = true | Treated Metal = true | Gearbox = true | Paint = true | false }}}}
+
{{#vardefine:isComplex|{{#switch: {{FULLPAGENAME}} | Treated Boards = true | Treated Metal = true | Gearbox = true | Paint = true | Raeli Tiles = true | Cut Gems = true | false }}}}
{{#ifeq: {{trim|{{{1}}}}} | Building |
+
{{#ifeq: {{trim|{{{1}}}}} | All |{{#arraydefine:buildings|{{#ask:
{{#arraydefine:buildings|{{#ask:
+
    [[Has subobject::<q>[[requires::{{FULLPAGENAME}}]]</q>]] | link=none |limit = 1000
 +
}}}}}}{{#ifeq: {{trim|{{{1}}}}} | Building |{{#arraydefine:buildings|{{#ask:
 
     [[Category:Buildings]]
 
     [[Category:Buildings]]
     [[Has subobject::<q>[[requires::{{FULLPAGENAME}}]]</q>]] | link=none
+
     [[Has subobject::<q>[[requires::{{FULLPAGENAME}}]]</q>]] | link=none |limit = 1000
}}}}
+
}}}}}}{{#ifeq: {{trim|{{{1}}}}} | Research |{{#arraydefine:buildings|{{#ask:
}}
 
{{#ifeq: {{trim|{{{1}}}}} | Research |
 
{{#arraydefine:buildings|{{#ask:
 
 
     [[Category:Technologies]]
 
     [[Category:Technologies]]
     [[Has subobject::<q>[[requires::{{FULLPAGENAME}}]]</q>]] | link=none
+
     [[Has subobject::<q>[[requires::{{FULLPAGENAME}}]]</q>]] | link=none |limit = 1000
}}}}
+
}}}}}}{| class="smwtable-clean sortable"  
}}
+
! Building  
{| class="smwtable-clean sortable"  
+
! Count  
! Building !! Count {{#ifeq: {{#var: isComplex}} | true | !! Properties}}
+
{{#ifeq: {{#var: isComplex}} | true | ! Properties}}
 +
! Verified
 
|-
 
|-
 
{{#loop: i
 
{{#loop: i
Line 25: Line 24:
 
   }}}}
 
   }}}}
 
    
 
    
   {{#arrayprint:requirements
+
   {{#loop: j
     |<br/>
+
     | 0
     | @@@@
+
     | {{ #arraysize:requirements }}
     |  
+
     |
 +
    {{!}}-
 
     {{!}}[[{{ #arrayindex: buildings | {{ #var:i }} }}]]
 
     {{!}}[[{{ #arrayindex: buildings | {{ #var:i }} }}]]
     {{!}} style="text-align: center" {{!}} {{#show: @@@@ | ?count# }}
+
     {{!}} style="text-align: center" {{!}} {{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?count#= |mainlabel=- }}
     {{#ifeq: {{#var: isComplex}} | true | {{!}} style="text-align: center" {{!}} {{#show: @@@@ | ?requires_property# }}}}
+
     {{#ifeq: {{#var: isComplex}} | true | {{!}} style="text-align: center" {{!}} {{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?requires_property#= |mainlabel=- }}}}
 +
    {{!}} style="text-align: center" {{!}} {{#ifeq: {{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?verified#= |mainlabel=- }}|True|<v/>|<uv/>}}
 
     {{!}}-
 
     {{!}}-
 
   }}
 
   }}
 
}}
 
}}
 
|}
 
|}

Latest revision as of 15:22, 7 May 2021

Building Count Verified