Template:Consumables: Difference between revisions
(Undo revision 15592 by ZombieLawnGnome (talk)) |
(An attempt to add support for an optional "rotten image" parameter to the template.) |
||
Line 6: | Line 6: | ||
{{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }} </div> | {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }} </div> | ||
<div style="padding: 0em 1em;"> | <div style="padding: 0em 1em;"> | ||
<center>[[Image:{{{image}}}|120px]] | <center> | ||
[[Image:{{{image}}}|120px]] | |||
<small> | <small> | ||
'''Weight:''' {{{weight}}} <BR> | '''Weight:''' {{{weight}}} <BR> | ||
Line 14: | Line 15: | ||
{{#ifexpr:{{{happiness|0}}}<>0|'''Happiness Change:''' {{{happiness}}}|}} | {{#ifexpr:{{{happiness|0}}}<>0|'''Happiness Change:''' {{{happiness}}}|}} | ||
</small> | </small> | ||
{{#ifeq:{{{rotten image|x}}}|[[Image:{{{rotten image}}}|120px]]| }} | |||
</center> | </center> | ||
</div> | </div> |
Revision as of 01:54, 4 December 2013
Consumables
[[Image:{{{image}}}|120px]]
Weight: {{{weight}}}
|
Usage Example:
Use this template to add an infobox to a consumable item's page. If a property is not included, it will not be displayed. Possible properties to add include:
Weight [required]
Image [required]
Hunger
boredom
stress
happiness
Example usage in a page:
{{Consumables2 |name = Test |image = Template-info.png |hunger = -20 |weight = 0.2 }}