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

Материал из Celadon | Wiki Shiptest
Перейти к навигации Перейти к поиску
мНет описания правки
Метка: отменено
м (Откат правок Pofea (обсуждение) к последней версии Dorou)
Метка: откат
 
(не показана 1 промежуточная версия этого же участника)
Строка 1: Строка 1:
<includeonly>
<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>
{{#if:{{{contents|}}}
 
|{{Storage
= How to use =
|name={{{name}}}
 
|runame={{{runame}}}
template intended for lists of objects to clean them up a bit.
|image={{{image}}}
 
|OverrideImage={{{OverrideImage|}}}
== With no parameters ==
|bgcolor1={{{bgcolor1}}}
|bgcolor2={{{bgcolor2}}}
|foundin={{{foundin}}}
|usedfor={{{usedfor}}}
|strategy={{{strategy}}}
|description={{{description}}}
|contents={{{contents}}}
}}
|{{#if:{{{strategy|}}}
|{{ItemMedium
|name={{{name}}}
|runame={{{runame}}}
|image={{{image}}}
|OverrideImage={{{OverrideImage|}}}
|bgcolor1={{{bgcolor1}}}
|bgcolor2={{{bgcolor2}}}
|foundin={{{foundin}}}
|usedfor={{{usedfor}}}
|strategy={{{strategy}}}
|description={{{description}}}
}}
| {{#if:{{{usedfor|}}}
|{{ItemUsedFor
|name={{{name}}}
|runame={{{runame}}}
|image={{{image}}}
|OverrideImage={{{OverrideImage|}}}
|bgcolor1={{{bgcolor1}}}
|bgcolor2={{{bgcolor2}}}
|foundin={{{foundin}}}
|usedfor={{{usedfor}}}
|description={{{description}}}
}}
|{{#if:{{{name|}}}
|{{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>


= Как использовать =
  <nowiki>{{Item}}</nowiki>
Многоуровневый шаблон для предметов. В зависимости от количества переменных выводятся различные виды шаблона.<br>
'''<big>name</big>''' - Название предмета на иностранном.<br>
'''<big>runame</big>''' - Название предмета на русском.<br>
'''<big>image</big>''' - Изображение предмета. Пример - image.png <nowiki>(без [[ и ]])</nowiki><br>
'''<big>bgcolor1</big>''' - Цвет заднего фона изображения. Должен быть светлее чем bgcolor2. Пишется с # <br>
'''<big>bgcolor2</big>''' - Цвет границы и заднего фона оглавления "Описание". Пишется с # <br>
'''<big>foundin</big>''' - Где можно найти предмет. <br>
'''<big>usedfor</big>''' - Для чего используется предмет. <br>
'''<big>strategy</big>''' - Как именно использовать предмет (в виде совета).<br>
'''<big>description</big>''' - Описание предмета.<br>
'''<big>contents</big>''' - Содержание предмета.<br>


== Без параметров ==
Описание шаблона: Выдает ошибку.
<pre>
{{Item}}
</pre>
{{Item}}
{{Item}}


== С минимальным количеством параметров ==
== With minimum parameters ==
Описание шаблона: Шаблон с только именем и фото. (ItemSimple)
 
<pre>
The bare minimum is the name parameter.
{{Item
|name=Item
|bgcolor1 = #FFDD88
|bgcolor2 = #FFDD66
|image = HRO.png
}}
</pre>


{{Item
  <nowiki>{{Item</nowiki>
|name=Item
  <nowiki>|name=Test Item</nowiki>
|bgcolor1 = #FFDD88
  <nowiki>|bgcolor1 = #FFEE88</nowiki>
|bgcolor2 = #FFDD66
  <nowiki>|bgcolor2 = #FFDD66</nowiki>
|image = HRO.png
  <nowiki>|image = Redtoolbox.png</nowiki>
}}
  <nowiki>}}</nowiki>


== Стандартный шаблон ==
Описание шаблона: При отсутствии contents. (ItemMedium)
<pre>
{{Item
{{Item
|name=Test Item
|bgcolor1 = #FFEE88
|bgcolor1 = #FFEE88
|bgcolor2 = #FFDD66
|bgcolor2 = #FFDD66
|name = Item
|image = Redtoolbox.png
|runame = Предмет
|image = HRO.png
|foundin = Шкаф
|usedfor = Содержит предметы
|strategy = Брать с собой
|description = Он красный.
}}
}}
</pre>
 
== Normal item ==
 
If the description is set, 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>|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>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
  <nowiki>}}</nowiki>


{{Item
{{Item
|bgcolor1 = #FFEE88
|bgcolor1 = #FFEE88
|bgcolor2 = #FFDD66
|bgcolor2 = #FFDD66
|name = Item
|name = Emergency Toolbox
|runame = Предмет
|image = Redtoolbox.png
|image = HRO.png
|foundin = emergency lockers and storage areas
|foundin = Шкаф
|usedfor = Contains tools which are useful in emergencies
|usedfor = Содержит предметы
|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 = Брать с собой
|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 = Он красный.
 
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
}}
}}


==Без стратегии использования==
==Strategy-less items==
Описание шаблона: При отсутствии strategy и contents. (ItemUsedFor)
 
<pre>
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
{{Item
|bgcolor1 = #FFEE88
|name=Test Item
|bgcolor2 = #FFDD66
|bgcolor1 = #FFEE88
|name = Item
|bgcolor2 = #FFDD66
|runame = Предмет
|image = Redtoolbox.png
|image = HRO.png
|foundin = emergency lockers and storage areas
|foundin = Шкаф
|usedfor = Contains tools which are useful in emergencies
|usedfor = Содержит предметы
|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.
|description = Он красный.
}}
}}
== Container items ==
</pre>
 
If the contents variable is set, this template will show:


{{Item
  <nowiki>{{Item</nowiki>
|bgcolor1 = #FFEE88
  <nowiki>|bgcolor1 = #FFEE88</nowiki>
|bgcolor2 = #FFDD66
  <nowiki>|bgcolor2 = #FFDD66</nowiki>
|name = Item
  <nowiki>|name = Emergency Toolbox</nowiki>
|runame = Предмет
  <nowiki>|image = Redtoolbox.png</nowiki>
|image = HRO.png
  <nowiki>|foundin = emergency lockers and storage areas</nowiki>
|foundin = Шкаф
  <nowiki>|usedfor = Contains tools which are useful in emergencies</nowiki>
|usedfor = Содержит предметы
  <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>
|description = Он красный.
  <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>|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>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
  <nowiki>}}</nowiki>


== С содержанием ==
Описание шаблона: При отсутствии strategy. (Storage)
<pre>
{{Item
{{Item
|bgcolor1 = #FFEE88
|bgcolor1 = #FFEE88
|bgcolor2 = #FFDD66
|bgcolor2 = #FFDD66
|name = Item
|name = Emergency Toolbox
|runame = Предмет
|image = Redtoolbox.png
|image = HRO.png
|foundin = emergency lockers and storage areas
|foundin = Шкаф
|usedfor = Contains tools which are useful in emergencies
|usedfor = Содержит предметы
|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 = Брать с собой
|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 = Бумага<br>Ручка<br>Пистолет
|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 = Он красный.
}}
</pre>


{{Item
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
|bgcolor1 = #FFEE88
|bgcolor2 = #FFDD66
|name = Item
|runame = Предмет
|image = HRO.png
|foundin = Шкаф
|usedfor = Содержит предметы
|strategy = Брать с собой
|contents = Бумага<br>Ручка<br>Пистолет
|description = Он красный.
}}
}}
[[Category:Templates]]


==!СЛОМАНО! Перезапись фото !СЛОМАНО!==
==Override Image==
Если изображение больше 50px, оно больше не будет ломаться, поскольку это более крутая вики, но будет выглядеть очень маленьким, как показано ниже.
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>
Установка параметра "OverrideImage=true" отключит код изображения по умолчанию, и вы сможете добавить свой собственный.<br>
Setting "OverrideImage=true" will disable the default image code so you can add your own.<br>
По умолчанию используется код изображения:
The default image code is:<br>
<pre>
<nowiki>[[File:{{{image|{{{name|Unknown}}}.png}}}|px50|{{{name|Item}}}]]</nowiki>
[[File:{{{image|{{{name|Unknown}}}.png}}}|px50|{{{name|Item}}}]]
</pre>


'''Без настройки "OverrideImage":'''
For better understanding see these two examples:
<pre>
{{Item
|bgcolor1 = #cce6ff
|bgcolor2 = #99ccff
|name = Item
|runame = Предмет
|image = HRO.png
}}
</pre>


'''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
{{Item
|bgcolor1 = #cce6ff
|bgcolor1 = #cce6ff
|bgcolor2 = #99ccff
|bgcolor2 = #99ccff
|name = Item
|name = Particle Accelerator
|runame = Предмет
|image = ParticleAccelerator.gif
|image = HRO.png
}}
}}






'''С настройкой "OverrideImage":'''
'''With setting "OverrideImage":'''
 
<nowiki>{{Item</nowiki>
<pre>
<nowiki>|bgcolor1 = #cce6ff</nowiki>
{{Item
<nowiki>|bgcolor2 = #99ccff</nowiki>
|bgcolor1 = #cce6ff
<nowiki>|name = Particle Accelerator</nowiki>
|bgcolor2 = #99ccff
<nowiki>|image = [[File:ParticleAccelerator.gif|Particle Accelerator]]</nowiki>
|name = Item
<nowiki>|OverrideImage = true</nowiki>
|runame = Предмет
<nowiki>}}</nowiki>
|image = HRO.png
|OverrideImage = true
}}
</pre>
 
{{Item
{{Item
|bgcolor1 = #cce6ff
|bgcolor1 = #cce6ff
|bgcolor2 = #99ccff
|bgcolor2 = #99ccff
|name = Item
|name = Particle Accelerator
|runame = Предмет
|image = [[File:ParticleAccelerator.gif|Particle Accelerator]]
|image = HRO.png
|OverrideImage = true
|OverrideImage = true
}}
}}


[[Категория:Шаблоны-конструкторы]]
</noinclude>
</noinclude>

Текущая версия от 23:38, 27 февраля 2024


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 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.
Содержание Описание

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