Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Item: Difference between revisions

Template page
(Created page with "<onlyinclude>{{#if:{{{contents|}}}| {{Storage|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}|contents={{{contents}}}}} | {{#if:{{{strategy|}}}| {{ItemMedium|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{...")
 
No edit summary
Line 1: Line 1:
<onlyinclude>{{#if:{{{contents|}}}| {{Storage|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}|contents={{{contents}}}}} | {{#if:{{{strategy|}}}| {{ItemMedium|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}}} | {{#if:{{{usedfor|}}}| {{ItemUsedFor|name={{{name}}}|image={{{image}}}|OverrideImage={{{OverrideImage|}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|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> }} }} }} }}</onlyinclude>
<onlyinclude>{| style="border: 1px solid {{{bgcolor2|#000000}}}; margin: 1em 0em;" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}{{{description|}}}{{{contents|}}}|width="90%"|}} cellspacing="0" cellpadding="2"
{{#if:{{{name|}}}|! colspan="2" style="background-color: {{{bgcolor2|#bbbbbb}}};" {{!}} {{{name}}}
{{!}}-|}}
| style="background-color: {{{bgcolor1|#cccccc}}};" align="center" width="150" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}||colspan=2}} | [[File:{{{image|{{{name|Wrench}}}.png}}}|64px]]
{{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}|{{!}} valign="top" {{!}} {{#if:{{{foundin|}}}|'''Found in:''' {{{foundin}}}<br />|}}{{#if:{{{usedfor|}}}|'''Used for:''' {{{usedfor}}}<br />|}}{{#if:{{{strategy|}}}|'''Strategy:''' {{{strategy}}}<br />|}}
|{{!}} style="padding: 0;" {{!}}}}
{{#if:{{{contents|}}}|{{!}}- style="background-color: {{{bgcolor2|#bbbbbb}}};" align="center"
{{!}} colspan="1" {{!}} '''Contents'''
{{!}} colspan="1" {{!}} '''Description'''
{{!}}-
{{!}} colspan="1" style="background-color: {{{bgcolor1|#cccccc}}};" align=center {{!}}
{{{contents}}}
{{!}} colspan="1" {{!}}
{{{description}}}|{{#if:{{{description|}}}|{{!}}- style="background-color: {{{bgcolor2|#bbbbbb}}};" align="center"
{{!}} colspan="2" {{!}} '''Description'''
{{!}}- valign="top"
{{!}} colspan="2" {{!}}
{{{description}}}|}}}}
|}</onlyinclude>
 
<noinclude>{| style="border: 1px solid {{{bgcolor2|#000000}}}; margin: 1em 0em;" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}{{{description|}}}{{{contents|}}}|width="90%"|}} cellspacing="0" cellpadding="2"
{{#if:{{{name|}}}|! colspan="2" style="background-color: {{{bgcolor2|#bbbbbb}}};" {{!}} {{{name}}}
{{!}}-|}}
| style="background-color: {{{bgcolor1|#cccccc}}};" align="center" width="150" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}||colspan=2}} | [[File:{{{image|{{{name|Wrench}}}.png}}}|64px]]
{{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}|{{!}} valign="top" {{!}} {{#if:{{{foundin|}}}|'''Found in:''' {{{foundin}}}<br />|}}{{#if:{{{usedfor|}}}|'''Used for:''' {{{usedfor}}}<br />|}}{{#if:{{{strategy|}}}|'''Strategy:''' {{{strategy}}}<br />|}}
|{{!}} style="padding: 0;" {{!}}}}
{{#if:{{{description|}}}|{{!}}- style="background-color: {{{bgcolor2|#bbbbbb}}};" align="center"
{{!}} colspan="2" {{!}} '''Description'''
{{!}}- valign="top"
{{!}} colspan="2" {{!}}
{{{description}}}|}}
{{#if:{{{contents|}}}|{{!}}- style="background-color: {{{bgcolor2|#bbbbbb}}};" align="center"
{{!}} colspan="2" {{!}} '''Contents'''
{{!}}- style="background-color: {{{bgcolor1|#cccccc}}};" valign="top"
{{!}} colspan="2" {{!}}
{{{contents}}}|}}
|}</noinclude>
 


== Usage ==
== Usage ==
 
This template is intended to help list item descriptions in a consistent fashion across articles.
template intended for lists of objects to clean them up a bit.


=== With no parameters ===
=== With no parameters ===
   <nowiki>{{Item}}</nowiki>
   <nowiki>{{Item}}</nowiki>


{{Item}}
{{Item}}


=== With minimum parameters ===
=== With minimal parameters ===
 
The bare minimum is with the <code>name</code> parameter:
The bare minimum is the name parameter.


   <nowiki>{{Item</nowiki>
   <nowiki>{{Item</nowiki>
   <nowiki>|name=Test Item</nowiki>
   <nowiki>| name = Test Item</nowiki>
   <nowiki>|bgcolor1 = #FFEE88</nowiki>
   <nowiki>| bgcolor1 = #95813b</nowiki>
   <nowiki>|bgcolor2 = #FFDD66</nowiki>
   <nowiki>| bgcolor2 = #7b6827</nowiki>
   <nowiki>|image = Redtoolbox.png</nowiki>
   <nowiki>| image = ToolboxElectrical.png</nowiki>
   <nowiki>}}</nowiki>
   <nowiki>}}</nowiki>


{{Item
{{Item
|name=Test Item
| name = Test Item
|bgcolor1 = #FFEE88
| bgcolor1 = #95813b
|bgcolor2 = #FFDD66
| bgcolor2 = #7b6827
|image = Redtoolbox.png
| image = ToolboxElectrical.png
}}
}}


=== Normal item ===
=== Typical item ===
 
If the <code>description</code> parameter is set, this template will show:
If the description is set, this template will show:


   <nowiki>{{Item</nowiki>
   <nowiki>{{Item</nowiki>
   <nowiki>|bgcolor1 = #FFEE88</nowiki>
   <nowiki>| bgcolor1 = #95813b</nowiki>
   <nowiki>|bgcolor2 = #FFDD66</nowiki>
   <nowiki>| bgcolor2 = #7b6827</nowiki>
   <nowiki>|name = Emergency Toolbox</nowiki>
   <nowiki>| name = Emergency Toolbox</nowiki>
   <nowiki>|image = Redtoolbox.png</nowiki>
   <nowiki>| image = ToolboxElectrical.png</nowiki>
   <nowiki>|foundin = emergency lockers and storage areas</nowiki>
   <nowiki>| foundin = emergency lockers and storage areas</nowiki>
   <nowiki>|usedfor = Contains tools which are useful in emergencies</nowiki>
   <nowiki>| usedfor = Contains tools which are useful in emergencies</nowiki>
   <nowiki>|strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.</nowiki>
   <nowiki>| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.</nowiki>
   <nowiki>|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.</nowiki>
   <nowiki>| 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.</nowiki>
 
   <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
   <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
   <nowiki>}}</nowiki>
   <nowiki>}}</nowiki>


{{Item
{{Item
|bgcolor1 = #FFEE88
| bgcolor1 = #95813b
|bgcolor2 = #FFDD66
| bgcolor2 = #7b6827
|name = Emergency Toolbox
| name = Emergency Toolbox
|image = Redtoolbox.png
| image = ToolboxElectrical.png
|foundin = emergency lockers and storage areas
| foundin = Emergency lockers and storage areas.
|usedfor = Contains tools which are useful in emergencies
| 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.
| 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.
| 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.
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:
  <nowiki>{{Item</nowiki>
  <nowiki>|bgcolor1 = #FFEE88</nowiki>
  <nowiki>|bgcolor2 = #FFDD66</nowiki>
  <nowiki>|name = Emergency Toolbox</nowiki>
  <nowiki>|image = Redtoolbox.png</nowiki>
  <nowiki>|foundin = emergency lockers and storage areas</nowiki>
  <nowiki>|usedfor = Contains tools which are useful in emergencies</nowiki>
  <nowiki>|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.</nowiki>
 
  <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
  <nowiki>}}</nowiki>
{{Item
|name=Test Item
|bgcolor1 = #FFEE88
|bgcolor2 = #FFDD66
|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.<br><br>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
}}


=== Container items ===
=== Container items ===
 
If the <code>contents</code> parameter is set, this template will show:
If the contents variable is set, this template will show:


   <nowiki>{{Item</nowiki>
   <nowiki>{{Item</nowiki>
   <nowiki>|bgcolor1 = #FFEE88</nowiki>
   <nowiki>| bgcolor1 = #95813b</nowiki>
   <nowiki>|bgcolor2 = #FFDD66</nowiki>
   <nowiki>| bgcolor2 = #7b6827</nowiki>
   <nowiki>|name = Emergency Toolbox</nowiki>
   <nowiki>| name = Emergency Toolbox</nowiki>
   <nowiki>|image = Redtoolbox.png</nowiki>
   <nowiki>| image = ToolboxElectrical.png</nowiki>
   <nowiki>|foundin = emergency lockers and storage areas</nowiki>
   <nowiki>| foundin = Emergency lockers and storage areas.</nowiki>
   <nowiki>|usedfor = Contains tools which are useful in emergencies</nowiki>
   <nowiki>| usedfor = Contains tools which are useful in emergencies.</nowiki>
   <nowiki>|strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.</nowiki>
   <nowiki>| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful, as well as a crowbar.</nowiki>
   <nowiki>|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]] </nowiki>
   <nowiki>| contents = [[File:Screwdriver.png]] [[File:Wrench.png]] [[File:Welder.png]] [[File:Crowbar.png]] [[File:Multitool.png]] [[File:Wirecutter.png]] </nowiki>
   <nowiki>|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.</nowiki>
   <nowiki>| 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.</nowiki>
 
   <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
   <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
   <nowiki>}}</nowiki>
   <nowiki>}}</nowiki>


{{Item
{{Item
|bgcolor1 = #FFEE88
| bgcolor1 = #95813b
|bgcolor2 = #FFDD66
| bgcolor2 = #7b6827
|name = Emergency Toolbox
| name = Emergency Toolbox
|image = Redtoolbox.png
| image = ToolboxElectrical.png
|foundin = emergency lockers and storage areas
| foundin = Emergency lockers and storage areas.
|usedfor = Contains tools which are useful in emergencies
| 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.
| 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]] [[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]]  
| contents = [[File:Screwdriver.png]] [[File:Wrench.png]] [[File:Welder.png]] [[File:Crowbar.png]] [[File:Multitool.png]] [[File:Wirecutter.png]]  
|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.
| 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.
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
}}
}}


[[Category:Templates]]<!-- Template originally from https://tgstation13.org/wiki/Template:Item -->
[[Category:Templates]]<!-- Template originally from https://paradisestation.org/wiki/index.php?title=User:White_In_Sky/Template -->

Revision as of 07:04, 8 October 2023



Usage

This template is intended to help list item descriptions in a consistent fashion across articles.

With no parameters

 {{Item}}

With minimal parameters

The bare minimum is with the name parameter:

 {{Item
 | name = Test Item
 | bgcolor1 = #95813b
 | bgcolor2 = #7b6827
 | image = ToolboxElectrical.png
 }}
Test Item
File:ToolboxElectrical.png

Typical item

If the description parameter is set, this template will show:

 {{Item
 | bgcolor1 = #95813b
 | bgcolor2 = #7b6827
 | name = Emergency Toolbox
 | image = ToolboxElectrical.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
File:ToolboxElectrical.png 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.

Container items

If the contents parameter is set, this template will show:

 {{Item
 | bgcolor1 = #95813b
 | bgcolor2 = #7b6827
 | name = Emergency Toolbox
 | image = ToolboxElectrical.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.png]] [[File:Wrench.png]] [[File:Welder.png]] [[File:Crowbar.png]] [[File:Multitool.png]] [[File:Wirecutter.png]] 
 | 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
File:ToolboxElectrical.png 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

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.