v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Attrib proc"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(add humanoids)
(now it properly detects genderlessness in 23a and 40d)
 
(9 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
#if:{{tag|{{{1}}}|SEMIMEGABEAST}}|{{attrib format|{{Catlink|Semi-megabeasts|Semi-megabeast}}{{Category|Semi-megabeasts}}}}}}{{
 
#if:{{tag|{{{1}}}|SEMIMEGABEAST}}|{{attrib format|{{Catlink|Semi-megabeasts|Semi-megabeast}}{{Category|Semi-megabeasts}}}}}}{{
 
#if:{{tag|{{{1}}}|TRAPAVOID}}|{{attrib format|{{Catlink|Trapavoid}}{{Category|Trapavoid}}}}}}{{
 
#if:{{tag|{{{1}}}|TRAPAVOID}}|{{attrib format|{{Catlink|Trapavoid}}{{Category|Trapavoid}}}}}}{{
 +
#if:{{tag|{{{1}}}|MISCHIEVOUS}}{{tag|{{{1}}}|MISCHIEVIOUS}}|{{attrib format|{{Catlink|Mischievous}}{{Category|Mischievous}}}}}}{{
 
#if:{{tag|{{{1}}}|AQUATIC}}|{{attrib format|{{Catlink|Aquatic}}{{Category|Aquatic}}}}}}{{
 
#if:{{tag|{{{1}}}|AQUATIC}}|{{attrib format|{{Catlink|Aquatic}}{{Category|Aquatic}}}}}}{{
 
#if:{{tag|{{{1}}}|AMPHIBIOUS}}|{{attrib format|{{Catlink|Amphibious}}{{Category|Amphibious}}}}}}{{
 
#if:{{tag|{{{1}}}|AMPHIBIOUS}}|{{attrib format|{{Catlink|Amphibious}}{{Category|Amphibious}}}}}}{{
 +
#ifexpr:{{#ifeq:{{NAMESPACE}}|23a|1|0}} or {{#ifeq:{{NAMESPACE}}|40d|1|0}}|{{
 +
#if:{{tag|{{{1}}}|NO_GENDER}}|{{attrib format|{{Catlink|Genderless}}{{Category|Genderless}}}}}}|{{
 +
#if:{{tag|{{{1}}}|MALE}}{{tag|{{{1}}}|FEMALE}}||{{attrib format|{{Catlink|Genderless}}{{Category|Genderless}}}}}}}}{{
 
#if:{{tag|{{{1}}}|NOSTUN}}|{{attrib format|{{Catlink|No Stun}}{{Category|No Stun}}}}}}{{
 
#if:{{tag|{{{1}}}|NOSTUN}}|{{attrib format|{{Catlink|No Stun}}{{Category|No Stun}}}}}}{{
 
#if:{{tag|{{{1}}}|NOPAIN}}|{{attrib format|{{Catlink|No Pain}}{{Category|No Pain}}}}}}{{
 
#if:{{tag|{{{1}}}|NOPAIN}}|{{attrib format|{{Catlink|No Pain}}{{Category|No Pain}}}}}}{{
Line 20: Line 24:
 
#if:{{tag|{{{1}}}|SYNDROME}}|{{attrib format|[[Syndrome]]{{Category|Syndrome}}}}}}{{
 
#if:{{tag|{{{1}}}|SYNDROME}}|{{attrib format|[[Syndrome]]{{Category|Syndrome}}}}}}{{
 
#if:{{tag|{{{1}}}|BEACH_FREQUENCY}}|{{attrib format|[[Beaching]]{{Category|Beaching}}}}}}{{
 
#if:{{tag|{{{1}}}|BEACH_FREQUENCY}}|{{attrib format|[[Beaching]]{{Category|Beaching}}}}}}{{
#switch:{{tagentry|{{{1}}}|BODY|0|1|NO}}|HUMANOID|HUMANOID_SIMPLE|HUMANOID_4ARMS={{attrib format|{{catlink|Humanoids}}{{category:Humanoids}}}}}}
+
#ifeq:{{creature/is humanoid|{{{2}}}}}|1|{{attrib format|{{catlink|Humanoids|Humanoid}}{{category|Humanoids}}}}}}
</includeonly><noinclude>
+
</includeonly><noinclude>{{documentation}}</noinclude>
 
 
Usage: <nowiki>{{attrib_proc | creature raws}}</nowiki>
 
 
 
Returns a formatted list of "interesting" attribute tags for the given raw creature data.
 
 
 
After making any edits that change the way categorization works in this template, you must also make a [[wikipedia:Help:Purge#Null_edit|null edit]] to [[template:Creaturelookup/0]] in order to propagate the changes correctly. <!-- Actually, doing a mull edit to any template directly transcluded on all the creature pages (or indirectly transcluded without a text parsing step in between the page and the template) would accomplish the same thing, but let's keep things simple-->
 
 
 
[[Category:Templates]][[Category:Raw templates]]
 
</noinclude>
 

Latest revision as of 10:10, 20 April 2019