Шаблон:Item: различия между версиями

imported>Deantwo
(→‎Override Image: Added a better description.)
imported>Deantwo
(Just changed the headlines. I am done now I promise!)
Строка 1: Строка 1:
<includeonly>{{#if:{{{contents|}}}| {{Storage|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}|contents={{{contents}}}}} | {{#if:{{{description|}}}| {{ItemMedium|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}}} | {{#if:{{{name|}}}| {{Template:ItemSimple|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}}} | <font color='red'>'''The item needs to have the name defined.'''</font> }} }} }}</includeonly><noinclude>
<includeonly>{{#if:{{{contents|}}}| {{Storage|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}|contents={{{contents}}}}} | {{#if:{{{description|}}}| {{ItemMedium|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}}} | {{#if:{{{name|}}}| {{Template:ItemSimple|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}}} | <font color='red'>'''The item needs to have the name defined.'''</font> }} }} }}</includeonly><noinclude>


== How to use ==
= How to use =


template intended for lists of objects to clean them up a bit.
template intended for lists of objects to clean them up a bit.


=== With no parameters ===
== With no parameters ==


   <nowiki>{{Item}}</nowiki>
   <nowiki>{{Item}}</nowiki>
Строка 11: Строка 11:
{{Item}}
{{Item}}


=== With minimum parameters ===
== With minimum parameters ==


The bare minimum is the name parameter.
The bare minimum is the name parameter.
Строка 29: Строка 29:
}}
}}


=== Normal item ===
== Normal item ==


If the description is set, this template will show.
If the description is set, this template will show.
Строка 59: Строка 59:
}}
}}


=== Container items ===
== Container items ==


If the contents variable is set, this template will thow:
If the contents variable is set, this template will thow:
Строка 92: Строка 92:
[[Category:Templates]]
[[Category:Templates]]


===Override Image===
==Override Image==


If an image is bigger than 50px they will break, setting "OverrideImage=true" will disable the default image code so you can add your own.
If an image is bigger than 50px they will break, setting "OverrideImage=true" will disable the default image code so you can add your own.

Версия от 14:36, 14 апреля 2014


How to use

template intended for lists of objects to clean them up a bit.

With no parameters

 {{Item}}

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
 }}
Test Item
Test Item

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.
 }}
Emergency Toolbox
Emergency Toolbox
Местонахождение: emergency lockers and storage areas
Используется для: Contains tools which are useful in emergencies
Стратегия: It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
Описание
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.

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.
 }}
Emergency Toolbox
Emergency Toolbox
Местонахождение: emergency lockers and storage areas
Используется для: Contains tools which are useful in emergencies
Стратегия: It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
Содержит
Screwdriver tool.png Wrench.png Welder.png
Crowbar.png Analyzer.png Wirecutters.png
Описание
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.

Override Image

If an image is bigger than 50px they will break, setting "OverrideImage=true" will disable the default image code so you can add your own. See these two examples:

Without setting "OverrideImage":

{{Item
|bgcolor1 = #cce6ff
|bgcolor2 = #99ccff
|name = Particle Accelerator
|image = ParticleAccelerator.gif
}}
Particle Accelerator
Particle Accelerator


With setting "OverrideImage":

{{Item
|bgcolor1 = #cce6ff
|bgcolor2 = #99ccff
|name = Particle Accelerator
|image = [[File:ParticleAccelerator.gif]]
|OverrideImage = true
}}
ParticleAccelerator.gif
Particle Accelerator