Template:Item

From Yogstation-13
Revision as of 03:41, 3 May 2020 by Helpful Herbert (talk | contribs) (Restructured documentation a bit and added details)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

Template intended for lists of objects to clean them up a bit. See General items for examples.

Parameter-Usage

Parameter Default Description
bgcolor1 #cccccc Background-color 1
bgcolor2 #bbbbbb Background-color 2
OverrideImage When set, the image parameter is directly inserted like [[File:Unknown.png]]. By default the image-paramter is used as an image-name like Unknown.png.
image Unknown.png Name of the item's image. See OverrideImage-parameter for alternative usage.
name Item Name of the item. If missing a warning will be displayed instead (The item needs to have the name defined.)
foundin Undefined Short information on where to find the item
usedfor Undefined Short information on the item's purpose
strategy Undefined A short description of the usage context
description No description A free description of the items, its properties and use-contexts.

Examples

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


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.
 }}


Redtoolbox.png
Emergency Toolbox
Found in: emergency lockers and storage areas
Used for: 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.

Strategy-less items

If there is no strategy variable but there are foundin and used for, 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
 |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.
 }}


Redtoolbox.png
Test Item
Found in: emergency lockers and storage areas
Used for: Contains tools which are useful in emergencies
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.

Container items

If the contents variable 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.
 |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.
 }}


Redtoolbox.png
Emergency Toolbox
Found in: emergency lockers and storage areas
Used for: 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 Description
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 not break anymore, since this is a more awesome wiki, but they will look very small, as shown below.
Setting "OverrideImage=true" will disable the default image code so you can add your own.
The default image code is:

[[File:{{{image|{{{name|Unknown}}}.png}}}|px50|{{{name|Item}}}]]

For better understanding see these two examples:

Without setting "OverrideImage":

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


With setting "OverrideImage":

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