Difference between revisions of "Template:Animals/Row"

From RimWorld Wiki
Jump to navigation Jump to search
m
(Attempt to show "N/A" if nuzzle field is null)
Line 25: Line 25:
 
| {{#show: {{{1|Wild boar}}}|?Gestation Period Days#}}
 
| {{#show: {{{1|Wild boar}}}|?Gestation Period Days#}}
 
| {{#show: {{{1|Wild boar}}}|?Nuzzle Mtb Hours#}}
 
| {{#show: {{{1|Wild boar}}}|?Nuzzle Mtb Hours#}}
| {{#show: {{{1|Wild boar}}}|?Minimum Handling Skill#}}
+
| {{#ifexpr: {{#show: {{{1|Wild boar}}}|?Minimum Handling Skill#}} > 0|{{#show: {{{1|Wild boar}}}|?Minimum Handling Skill#}}|{{#show: N/A}} }}
 
| {{#switch: {{#show: {{{1|Wild boar}}}|?Can Train Guard#}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 
| {{#switch: {{#show: {{{1|Wild boar}}}|?Can Train Guard#}} | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 
| {{#switch: {{#show: {{{1|Wild boar}}}|?Can Train Attack#}}  | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 
| {{#switch: {{#show: {{{1|Wild boar}}}|?Can Train Attack#}}  | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 
| {{#switch: {{#show: {{{1|Wild boar}}}|?Can Train Rescue#}}    | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 
| {{#switch: {{#show: {{{1|Wild boar}}}|?Can Train Rescue#}}    | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}
 
| {{#switch: {{#show: {{{1|Wild boar}}}|?Can Train Haul#}}      | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}</includeonly>
 
| {{#switch: {{#show: {{{1|Wild boar}}}|?Can Train Haul#}}      | true=[[File:check.png|24px|link=]] | false=[[File:ex.png|24px|link=]]}}</includeonly>

Revision as of 13:50, 30 June 2020

This template pulls the data from each animal's individual page and formats it into a neat row summary. It is only intended for use on the List of animals page.

Usage: {{Animals/Row|*name*}}

The template takes a single parameter, the name of the animal being referenced, which must be the exact name of the animal's main page. The parameter defaults to "Wild boar" if not given - used for testing/preview.