Difference between revisions of "Template:CropGrowthStages"
Jump to navigation
Jump to search
(New template) |
m (Prevent line wrapping) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
"description": "This template shows the growth stages of a crop.", | "description": "This template shows the growth stages of a crop.", | ||
"params": { | "params": { | ||
− | " | + | "name": { |
"label": "Crop name", | "label": "Crop name", | ||
"description": "The name of the crop to display", | "description": "The name of the crop to display", | ||
Line 11: | Line 11: | ||
"required": true | "required": true | ||
}, | }, | ||
− | " | + | "maxgrowth": { |
"label": "Max growth", | "label": "Max growth", | ||
"description": "The highest growth stage this crop grows to (maximum 9)", | "description": "The highest growth stage this crop grows to (maximum 9)", | ||
Line 21: | Line 21: | ||
} | } | ||
</templatedata> | </templatedata> | ||
+ | == Example == | ||
+ | {{CropGrowthStages|name=Barley|maxgrowth=7}} | ||
+ | |||
</noinclude> | </noinclude> | ||
− | <onlyinclude><includeonly>{{# | + | <onlyinclude><includeonly><span style="white-space: nowrap;">{{#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]]}}</span></includeonly></onlyinclude> |