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:Creature/is humanoid"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (reading the documentation would probably help)
m (wrong tag)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#switch:{{#rsplit|{{#df_tagvalue:{{{{{ns|{{NAMESPACE}}}}}:{{{1|{{PAGENAME}}}}}/raw}}|BODY|0|NOT_HUMANOID}}|:|1}}|HUMANOID|HUMANOID_SIMPLE=1|#default=0}} ({{#df_tagvalue:{{{{{ns|{{NAMESPACE}}}}}:{{{1|{{PAGENAME}}}}}/raw}}|BODY|0|NOT_HUMANOID}})<noinclude>
+
<includeonly>{{#ifeq:{{#df_tagentry:{{{{{ns|{{NAMESPACE}}}}}:{{{1|{{PAGENAME}}}}}/raw|1}}|APPLY_CREATURE_VARIATION|0|1|notfound}}|ANIMAL_PERSON|1|{{
 +
#ifeq:{{#rsplit:{{#rreplace:{{#df_tagentry:{{{{{ns|{{NAMESPACE}}}}}:{{{1|{{PAGENAME}}}}}/raw}}|BODY|0|1|NOT_HUMANOID}}|HUMANOID_ARMLESS|INVALID_TYPE}}|_|0}}|HUMANOID|1|0}}}}</includeonly><noinclude>
 
Returns 1 if the given creature is a humanoid, 0 otherwise
 
Returns 1 if the given creature is a humanoid, 0 otherwise
 
===Examples===
 
===Examples===
{{creature/is humanoid|ant|ns=DF2012}}
+
<nowiki>{{creature/is humanoid|ant|ns=DF2012}}</nowiki>: {{creature/is humanoid|ant|ns=DF2012}}<br/>
{{creature/is humanoid|antman|ns=DF2012}}
+
<nowiki>{{creature/is humanoid|antman|ns=DF2012}}</nowiki>: {{creature/is humanoid|antman|ns=DF2012}}<br/>
 +
<nowiki>{{creature/is humanoid|barn owl|ns=DF2012}}</nowiki>: {{creature/is humanoid|barn owl|ns=DF2012}}<br/>
 +
<nowiki>{{creature/is humanoid|crab man|ns=DF2012}}</nowiki>: {{creature/is humanoid|crab man|ns=DF2012}}
  
 
</noinclude>
 
</noinclude>

Latest revision as of 00:18, 17 April 2013

Returns 1 if the given creature is a humanoid, 0 otherwise

Examples[edit]

{{creature/is humanoid|ant|ns=DF2012}}: 0
{{creature/is humanoid|antman|ns=DF2012}}: 1
{{creature/is humanoid|barn owl|ns=DF2012}}: 0
{{creature/is humanoid|crab man|ns=DF2012}}: 1