Difference between revisions of "Template:UnitData getData"

From Zero-K
Jump to navigation Jump to search
(Return 0 if property doesn't exist.)
m (Remove extra space)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<includeonly>{{#if: {{#invoke:UnitData|getData|{{{1|}}}|{{{2|}}}}}
 
<includeonly>{{#if: {{#invoke:UnitData|getData|{{{1|}}}|{{{2|}}}}}
   |{{#invoke:UnitData|getData|{{{1|}}}|{{{2|}}}}}|0}}</includeonly>
+
   |{{#invoke:UnitData|getData|{{{1|}}}|{{{2|}}}}}|{{{3|0}}}}}</includeonly><noinclude>
<noinclude>
 
 
{{Documentation}}
 
{{Documentation}}
 
<!-- Please add categories and interwiki links to /doc subpage, not here! -->
 
<!-- Please add categories and interwiki links to /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Latest revision as of 22:03, 22 June 2024

Template documentation[view] [edit] [history] [purge]

A convenience template to allow using auto-generated unit data in text.

The first parameter is the internal name of the unit, the second is the name of the property. The third is what to print if the property doesn't exist for that unit.