A Wiki in the Desert
Log in

Difference between revisions of "Template:RequireList"

From A Wiki in the Desert
Line 1: Line 1:
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Specialization]] |format=array|name=specrequires}}
+
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Specialization]] |format=array|name=specrequires}}<nowiki/>
{{#loop: j | 0 | {{#arraysize:specrequires}} | <nowiki/>
+
{{#loop: i
* Required to unlock the [[{{#arrayindex:specrequires|{{#var:j}}}}]] specialization.
+
  | 0  
}}
+
  | {{#arraysize:specrequires}}  
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Buildings]] |format=array|name=buildingrequires}}
+
  | <nowiki/>
{{#loop: j | 0 | {{#arraysize:buildingrequires}} | <nowiki/>
+
* Required to unlock the [[{{#arrayindex:specrequires|{{#var:i}}}}]] specialization.
* Required to build [[{{#arrayindex:buildingrequires|{{#var:j}}}}]]
+
}}<nowiki/>
}}
+
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Buildings]] |format=array|name=buildingrequires}}<nowiki/>
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Resources]] |format=array|name=resourcerequires}}
+
{{#loop: i
{{#loop: j | 0 | {{#arraysize:resourcerequires}} | <nowiki/>
+
  | 0  
* Required to gather [[{{#arrayindex:resourcerequires|{{#var:j}}}}]]
+
  | {{#arraysize:buildingrequires}}  
}}
+
  | <nowiki/>
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Items]] |format=array|name=itemrequires}}
+
* Required to build [[{{#arrayindex:buildingrequires|{{#var:i}}}}]]
{{#loop: j | 0 | {{#arraysize:itemrequires}} | <nowiki/>
+
}}<nowiki/>
* Required to produce [[{{#arrayindex:itemrequires|{{#var:j}}}}]]
+
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Resources]] |format=array|name=resourcerequires}}<nowiki/>
}}
+
{{#loop: i
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Is upgrade::True]]|format=array|name=buildingupgrade}}
+
  | 0  
{{#loop: i | 0 | {{#arraysize:buildingupgrade}} | <nowiki/>
+
  | {{#arraysize:resourcerequires}}  
 +
  | <nowiki/>
 +
* Required to gather [[{{#arrayindex:resourcerequires|{{#var:i}}}}]]
 +
}}<nowiki/>
 +
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Items]] |format=array|name=itemrequires}}<nowiki/>
 +
{{#arraydiff:itemwithoutresource |itemrequires |resourcerequires }}<nowiki/>
 +
{{#loop: i
 +
  | 0  
 +
  | {{#arraysize:itemwithoutresource}}  
 +
  | <nowiki/>
 +
* Required to produce [[{{#arrayindex:itemwithoutresource|{{#var:i}}}}]]
 +
}}<nowiki/>
 +
{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Is upgrade::True]]|format=array|name=buildingupgrade}}<nowiki/>
 +
{{#loop: i  
 +
  | 0  
 +
  | {{#arraysize:buildingupgrade}}  
 +
  | <nowiki/>
 
* 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/>

Revision as of 17:01, 23 May 2021