A Wiki in the Desert
Log in

Difference between revisions of "Template:RequireList"

From A Wiki in the Desert
 
(8 intermediate revisions by the same user not shown)
Line 21: Line 21:
 
}}<nowiki/>
 
}}<nowiki/>
 
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Items]] |format=array|name=itemrequires}}<nowiki/>
 
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Items]] |format=array|name=itemrequires}}<nowiki/>
{{#arraydiff:itemwithoutresource |itemrequires |resourcerequires }}<nowiki/>
+
{{#arraydiff:itemswithoutresources |itemrequires |resourcerequires }}<nowiki/>
 
{{#loop: i  
 
{{#loop: i  
 
   | 0  
 
   | 0  
   | {{#arraysize:itemwithoutresource}}  
+
   | {{#arraysize:itemswithoutresources}}  
 
   | <nowiki/>
 
   | <nowiki/>
* Required to produce [[{{#arrayindex:itemwithoutresource|{{#var:i}}}}]]
+
* Required to produce [[{{#arrayindex:itemswithoutresources|{{#var:i}}}}]]
 
}}<nowiki/>
 
}}<nowiki/>
 
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Is upgrade::True]]|format=array|name=buildingupgrade}}<nowiki/>
 
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Is upgrade::True]]|format=array|name=buildingupgrade}}<nowiki/>
Line 35: Line 35:
 
* Required to upgrade [[{{#ask:[[{{#arrayindex:buildingupgrade|{{#var:i}}}}]]|?Has parent#=|mainlabel=-}}]]
 
* Required to upgrade [[{{#ask:[[{{#arrayindex:buildingupgrade|{{#var:i}}}}]]|?Has parent#=|mainlabel=-}}]]
 
** {{#ask:[[{{#arrayindex:buildingupgrade|{{#var:i}}}}]]|?Has benefit#=|mainlabel=-}}
 
** {{#ask:[[{{#arrayindex:buildingupgrade|{{#var:i}}}}]]|?Has benefit#=|mainlabel=-}}
 +
}}<nowiki/>
 +
{{#ask: [[{{trim|{{{1}}}}}]]|?Has benefit|mainlabel=-|format=array|name=benefitrequires}}<nowiki/>
 +
{{#loop: i
 +
  | 0
 +
  | {{#arraysize:benefitrequires}}
 +
  | <nowiki/>
 +
{{#if: {{#arrayindex:benefitrequires|{{#var:i}}}}|* {{#arrayindex:benefitrequires|{{#var:i}}}}}}
 
}}<nowiki/>
 
}}<nowiki/>

Latest revision as of 21:32, 24 May 2021