Difference between revisions of "Template:CropGrowthStages"

From TFC:TNG
Jump to navigation Jump to search
(Fix parameter references; use names instead of numbers)
(Fix expressions)
Line 22: Line 22:
 
</templatedata>
 
</templatedata>
 
</noinclude>
 
</noinclude>
<onlyinclude><includeonly>{{#if: {{#expr: {{{maxgrowth}}} >= 0}}|[[File:{{{name}}} 0.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 1}}|[[File:{{{name}}} 1.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 2}}|[[File:{{{name}}} 2.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 3}}|[[File:{{{name}}} 3.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 4}}|[[File:{{{name}}} 4.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 5}}|[[File:{{{name}}} 5.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 6}}|[[File:{{{name}}} 6.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 7}}|[[File:{{{name}}} 7.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 8}}|[[File:{{{name}}} 8.png|x50px]]}}{{#if: {{#expr: {{{maxgrowth}}} >= 9}}|[[File:{{{name}}} 9.png|x50px]]}}</includeonly></onlyinclude>
+
<onlyinclude><includeonly>{{#ifexpr: {{{maxgrowth}}} >= 0|[[File:{{{name}}} 0.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 1|[[File:{{{name}}} 1.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 2|[[File:{{{name}}} 2.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 3|[[File:{{{name}}} 3.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 4|[[File:{{{name}}} 4.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 5|[[File:{{{name}}} 5.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 6|[[File:{{{name}}} 6.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 7|[[File:{{{name}}} 7.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 8|[[File:{{{name}}} 8.png|x50px]]}}{{#ifexpr: {{{maxgrowth}}} >= 9|[[File:{{{name}}} 9.png|x50px]]}}</includeonly></onlyinclude>

Revision as of 22:23, 6 September 2020

This template shows the growth stages of a crop.

Template parameters

ParameterDescriptionTypeStatus
Crop namename

The name of the crop to display

Example
Barley
Stringrequired
Max growthmaxgrowth

The highest growth stage this crop grows to (maximum 9)

Example
7
Numberrequired