A Wiki in the Desert
Log in

Difference between revisions of "Template:TechnologyPipsCompleted"

From A Wiki in the Desert
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine:sum|0}}{{#vardefine:tech|{{trim|{{{1|Technology/Blacksmithing/2}}}}}}}
+
{{#vardefine:sum|0}}{{#vardefine:tech|{{trim|{{{1|Technology/Blacksmithing/2}}}}}}}{{#loop: i  
{{#loop: i  
 
 
   | 1  
 
   | 1  
 
   | {{#ask: [[Category:Laboratories]] |format=count}}  
 
   | {{#ask: [[Category:Laboratories]] |format=count}}  
   | {{#arraydefine:techs|{{#ask: [[Laboratory/{{#var:i}}]] |?Working on#= |mainlabel=- |format=plainlist}}}}
+
   | {{#arraydefine:techs|{{#ask: [[Laboratory/{{#var:i}}]] |?Working on#= |mainlabel=- |format=plainlist}}}}{{#if: {{#arraysearch:techs|{{#var:tech}}}}||{{#vardefine:sum|{{#expr:{{#var:sum}}+{{#ask: [[Laboratory/{{#var:i}}]] |?Has level#= |mainlabel=- |format=plainlist}}}}}}}}
{{#arrayprint:techs}}
+
}}{{formatnum:{{#var:sum}}|R}}
{{#if: {{#arraysearch:techs|{{#var:tech}}}}
 
|
 
|{{#vardefine:sum|{{#expr:{{#var:sum}}+{{#ask: [[Laboratory/{{#var:i}}]] |?Has level#= |mainlabel=- |format=plainlist}}}}}}
 
}}
 
}}{{#var:tech}} {{#var:sum}}<noinclude>
 
<templatedata>
 
{
 
"params": {
 
"1": {
 
"label": "Technology",
 
"example": "Technology/Blacksmithing/2",
 
"required": true
 
}
 
}
 
}
 
</templatedata>
 
</noinclude>
 

Latest revision as of 21:38, 26 June 2021

50