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: | + | {{#loop: i |
− | * Required to unlock the [[{{#arrayindex:specrequires|{{#var: | + | | 0 |
− | }} | + | | {{#arraysize:specrequires}} |
− | {{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Buildings]] |format=array|name=buildingrequires}} | + | | <nowiki/> |
− | {{#loop: | + | * Required to unlock the [[{{#arrayindex:specrequires|{{#var:i}}}}]] specialization. |
− | * Required to build [[{{#arrayindex:buildingrequires|{{#var: | + | }}<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: | + | | 0 |
− | * Required to gather [[{{#arrayindex:resourcerequires|{{#var: | + | | {{#arraysize:buildingrequires}} |
− | }} | + | | <nowiki/> |
− | {{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Items]] |format=array|name=itemrequires}} | + | * Required to build [[{{#arrayindex:buildingrequires|{{#var:i}}}}]] |
− | {{#loop: | + | }}<nowiki/> |
− | * Required to produce [[{{#arrayindex: | + | {{#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