Template:Item: Difference between revisions
imported>Deantwo Added a "oddsizeimage" option, because I am freaking tired of images breaking when using the template. |
imported>Deantwo →Odd Size Image: Added more information and an example without. |
||
Line 94: | Line 94: | ||
===Odd Size Image === | ===Odd Size Image === | ||
If an image is bigger than 50px they will break, setting "oddsizeimage=true" will override this. | |||
'''Without setting "oddsizeimage":''' | |||
<nowiki>{{Item</nowiki> | |||
<nowiki>|bgcolor1 = #cce6ff</nowiki> | |||
<nowiki>|bgcolor2 = #99ccff</nowiki> | |||
<nowiki>|name = Particle Accelerator</nowiki> | |||
<nowiki>|image = ParticleAccelerator.gif</nowiki> | |||
<nowiki>}}</nowiki> | |||
{{Item | |||
|bgcolor1 = #cce6ff | |||
|bgcolor2 = #99ccff | |||
|name = Particle Accelerator | |||
|image = ParticleAccelerator.gif | |||
}} | |||
'''With setting "oddsizeimage":''' | |||
<nowiki>{{Item</nowiki> | <nowiki>{{Item</nowiki> | ||
<nowiki>|bgcolor1 = #cce6ff</nowiki> | <nowiki>|bgcolor1 = #cce6ff</nowiki> | ||
Line 100: | Line 120: | ||
<nowiki>|image = ParticleAccelerator.gif</nowiki> | <nowiki>|image = ParticleAccelerator.gif</nowiki> | ||
<nowiki>|oddsizeimage = true</nowiki> | <nowiki>|oddsizeimage = true</nowiki> | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
Line 112: | Line 128: | ||
|image = ParticleAccelerator.gif | |image = ParticleAccelerator.gif | ||
|oddsizeimage = true | |oddsizeimage = true | ||
}} | }} | ||
</noinclude> | </noinclude> |
Revision as of 22:55, 25 January 2014
{{#if:|
|
| {{#if:|
|
| {{#if:|
|
| The item needs to have the name defined. }} }} }}
How to use
template intended for lists of objects to clean them up a bit.
With no parameters
{{Item}}
{{#if:|
|
| {{#if:|
|
| {{#if:|
|
| The item needs to have the name defined. }} }} }}
With minimum parameters
The bare minimum is the name parameter.
{{Item |name=Test Item |bgcolor1 = #FFEE88 |bgcolor2 = #FFDD66 |image = Redtoolbox.png }}
{{#if:|
|
| {{#if:|
|
| {{#if:Test Item|
|
| The item needs to have the name defined. }} }} }}
Normal item
If the description is set, this template will show.
{{Item |bgcolor1 = #FFEE88 |bgcolor2 = #FFDD66 |name = Emergency Toolbox |image = Redtoolbox.png |foundin = emergency lockers and storage areas |usedfor = Contains tools which are useful in emergencies |strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar. |description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency. Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes. }}
{{#if:|
| {{#if:The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.|
|
| {{#if:Emergency Toolbox|
|
| The item needs to have the name defined. }} }} }}
Container items
If the contents variable is set, this template will thow:
{{Item |bgcolor1 = #FFEE88 |bgcolor2 = #FFDD66 |name = Emergency Toolbox |image = Redtoolbox.png |foundin = emergency lockers and storage areas |usedfor = Contains tools which are useful in emergencies |strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar. |contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welder.png|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]] <nowiki>[[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]] |description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when <nowiki>trying to cause an emergency. Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes. }}
|
| {{#if:The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.|
|
| {{#if:Emergency Toolbox|
|
| The item needs to have the name defined. }} }} }}
Odd Size Image
If an image is bigger than 50px they will break, setting "oddsizeimage=true" will override this.
Without setting "oddsizeimage":
{{Item |bgcolor1 = #cce6ff |bgcolor2 = #99ccff |name = Particle Accelerator |image = ParticleAccelerator.gif }}
{{#if:|
|
| {{#if:|
|
| {{#if:Particle Accelerator|
|
| The item needs to have the name defined. }} }} }}
With setting "oddsizeimage":
{{Item |bgcolor1 = #cce6ff |bgcolor2 = #99ccff |name = Particle Accelerator |image = ParticleAccelerator.gif |oddsizeimage = true }}
{{#if:|
|
| {{#if:|
|
| {{#if:Particle Accelerator|
|
| The item needs to have the name defined. }} }} }}