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

Материал из Tau Ceti Station Wiki
Перейти к навигации Перейти к поиску
(Новая страница: «{{#if:{{{contents|}}}| {{Storage|name={{{name}}}|image={{{image}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|str…»)
 
 
(не показаны 4 промежуточные версии 2 участников)
Строка 1: Строка 1:
{{#if:{{{contents|}}}| {{Storage|name={{{name}}}|image={{{image}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}|contents={{{contents}}}}} | {{#if:{{{description|}}}| {{ItemMedium|name={{{name}}}|image={{{image}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}}} | {{#if:{{{name|}}}| {{Template:ItemSimple|name={{{name}}}|image={{{image}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}}} | <font color='red'>'''The item needs to have the name defined.'''</font> }} }} }}<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:{{{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> }} }} }} }}</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:


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


=== Container items ===
==Strategy-less items==


If the contents variable is set, this template will thow:
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 ==
 
If the contents variable is set, this template will show:


   <nowiki>{{Item</nowiki>
   <nowiki>{{Item</nowiki>
Строка 71: Строка 96:
   <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_random.gif|link=Screwdriver]] [[File:Wrench1.gif|link=Wrench]] [[File:Welder1.gif|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]]  <nowiki>[[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters_random.gif|link=Wirecutters]] </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  <nowiki>trying to cause an emergency.</nowiki>
    
    
Строка 85: Строка 110:
|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_random.gif|link=Screwdriver]] [[File:Wrench1.gif|link=Wrench]] [[File:Welder1.gif|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]] [[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters_random.gif|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 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.


Строка 92: Строка 117:
[[Category:Templates]]
[[Category:Templates]]


==Override Image==
If an image is bigger than 50px they will <s>break</s> not break anymore, since this is a more awesome wiki, but they will look very small, as shown below.<br>
Setting "OverrideImage=true" will disable the default image code so you can add your own.<br>
The default image code is:<br>
<nowiki>[[File:{{{image|{{{name|Unknown}}}.png}}}|px50|{{{name|Item}}}]]</nowiki>
For better understanding see these two examples:
'''Without setting "OverrideImage":'''
<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 "OverrideImage":'''
<nowiki>{{Item</nowiki>
<nowiki>|bgcolor1 = #cce6ff</nowiki>
<nowiki>|bgcolor2 = #99ccff</nowiki>
<nowiki>|name = Particle Accelerator</nowiki>
<nowiki>|image = [[File:ParticleAccelerator.gif|Particle Accelerator]]</nowiki>
<nowiki>|OverrideImage = true</nowiki>
<nowiki>}}</nowiki>
{{Item
|bgcolor1 = #cce6ff
|bgcolor2 = #99ccff
|name = Particle Accelerator
|image = [[File:ParticleAccelerator.gif|Particle Accelerator]]
|OverrideImage = true
}}


</noinclude>
</noinclude>

Текущая версия на 20:40, 29 сентября 2021


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.

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


Test Item
Test Item
Находится в: emergency lockers and storage areas
Используется для: Contains tools which are useful in emergencies
Описание
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_random.gif|link=Screwdriver]] [[File:Wrench1.gif|link=Wrench]] [[File:Welder1.gif|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]]   <nowiki>[[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters_random.gif|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 random.gif Wrench1.gif Welder1.gif
Crowbar.png Analyzer.png Wirecutters random.gif
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
}}
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