Difference between revisions of "Template:Armor"

From Mine Blocks Wiki
Jump to navigation Jump to search
If you find a typo, inconsistency, or error, please sign up and help out the wiki! We can't do it without your help! :D Thank you!

(Created page with "{{#ifexpr: {{{1}}} > 0 | {{{1|1}}}|16x16px|class=item-icon pixel|link=Armor}} {{#ifexpr: {{{1}}} > 1 | {{{1|2}}}|File:ui-armor.png|16x16px|class=item-i...")
Β 
(Allowing to display 10 icons in a row because otherwise it can become confusing)
Β 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
βˆ’
{{#ifexpr: {{{1}}} > 0 | {{{1|1}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
<includeonly>{{#switch: {{{1}}}
βˆ’
{{#ifexpr: {{{1}}} > 1 | {{{1|2}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
| 0 = 0 ([[File:ui-armor-empty.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|0 armor points]])
βˆ’
{{#ifexpr: {{{1}}} > 2 | {{{1|3}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
| 1 = 1 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|1 armor point]])
βˆ’
{{#ifexpr: {{{1}}} > 3 | {{{1|4}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
| 2 = 2 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|2 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|2 armor points]])
βˆ’
{{#ifexpr: {{{1}}} > 4 | {{{1|5}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
| 3 = 3 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|3 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|3 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|3 armor points]])
βˆ’
{{#ifexpr: {{{1}}} > 5 | {{{1|6}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
| 4 = 4 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|4 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|4 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|4 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|4 armor points]])
βˆ’
{{#ifexpr: {{{1}}} > 6 | {{{1|7}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
| 5 = 5 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|5 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|5 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|5 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|5 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|5 armor points]])
βˆ’
{{#ifexpr: {{{1}}} > 7 | {{{1|8}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
| 6 = 6 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|6 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|6 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|6 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|6 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|6 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|6 armor points]])
βˆ’
{{#ifexpr: {{{1}}} > 8 | {{{1|9}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}
+
| 7 = 7 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|7 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|7 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|7 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|7 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|7 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|7 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|7 armor points]])
βˆ’
{{#ifexpr: {{{1}}} > 9 | {{{1|10}}}|[[File:ui-armor.png|16x16px|class=item-icon pixel|link=Armor]]}}<noinclude>
+
| 8 = 8 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|8 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|8 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|8 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|8 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|8 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|8 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|8 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|8 armor points]])
Β +
| 9 = 9 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|9 armor points]])
Β +
| 10 = 10 ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]][[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|10 armor points]])
Β +
| #default = {{{1}}} ([[File:ui-armor.png|{{{2|12x12px}}}|class=item-icon pixel|alt=πŸ›‘|link=|1 armor point]] Γ— {{{1}}})
Β +
}}</includeonly><noinclude>
Β 
== About ==
Β 
== About ==
Β 
This template serves to display armor points in a page.
Β 
This template serves to display armor points in a page.
Β Β 
Β 
== Usage ==
Β 
== Usage ==
βˆ’
The syntax of this template is <code>{{Armor|<number>}}</code>. If the value given is <code>0</code> or lower, or higher than <code>10</code>, it will display no icons and 10 armor icons respectively.
+
The syntax of this template is <code><nowiki>{{Armor|<number>|<size>}}</nowiki></code>. If the value is higher than <code>10</code>, it will display <code><nowiki>n Γ— <armor></nowiki></code> where <code>n</code> is the number you specified.
Β Β 
Β 
== Examples ==
Β 
== Examples ==
βˆ’
* <code><nowiki>{{Armor|0}}</nowiki></nowiki></code> β†’ {{Armor|0}}
+
* <code><nowiki>{{Armor|0}}</nowiki></code> β†’ {{Armor|0}}
βˆ’
* <code><nowiki>{{Armor|1}}</nowiki></nowiki></code> β†’ {{Armor|1}}
+
* <code><nowiki>{{Armor|1}}</nowiki></code> β†’ {{Armor|1}}
βˆ’
* <code><nowiki>{{Armor|2}}</nowiki></nowiki></code> β†’ {{Armor|2}}
+
* <code><nowiki>{{Armor|2}}</nowiki></code> β†’ {{Armor|2}}
βˆ’
* <code><nowiki>{{Armor|3}}</nowiki></nowiki></code> β†’ {{Armor|3}}
+
* <code><nowiki>{{Armor|3}}</nowiki></code> β†’ {{Armor|3}}
βˆ’
* <code><nowiki>{{Armor|4}}</nowiki></nowiki></code> β†’ {{Armor|4}}
+
* <code><nowiki>{{Armor|4}}</nowiki></code> β†’ {{Armor|4}}
βˆ’
* <code><nowiki>{{Armor|5}}</nowiki></nowiki></code> β†’ {{Armor|5}}
+
* <code><nowiki>{{Armor|5}}</nowiki></code> β†’ {{Armor|5}}
βˆ’
* <code><nowiki>{{Armor|6}}</nowiki></nowiki></code> β†’ {{Armor|5}}
+
* <code><nowiki>{{Armor|6}}</nowiki></code> β†’ {{Armor|6}}
βˆ’
* <code><nowiki>{{Armor|7}}</nowiki></nowiki></code> β†’ {{Armor|7}}
+
Β 
βˆ’
* <code><nowiki>{{Armor|8}}</nowiki></nowiki></code> β†’ {{Armor|8}}
+
Rounding examples:
βˆ’
* <code><nowiki>{{Armor|9}}</nowiki></nowiki></code> β†’ {{Armor|9}}
+
* <code><nowiki>{{Armor|1.25}}</nowiki></code> β†’ {{Armor|1.25}}
βˆ’
* <code><nowiki>{{Armor|10}}</nowiki></nowiki></code> β†’ {{Armor|10}}
+
* <code><nowiki>{{Armor|1.5}}</nowiki></code> β†’ {{Armor|1.5}}
Β +
* <code><nowiki>{{Armor|1.75}}</nowiki></code> β†’ {{Armor|1.75}}
Β +
Β 
Β +
More than 20 armor points:
Β +
* <code><nowiki>{{Armor|20.5}}</nowiki></code> β†’ {{Armor|20.5}}
Β +
* <code><nowiki>{{Armor|30}</nowiki></code> β†’ {{Armor|30}}
Β +
* <code><nowiki>{{Armor|600}}</nowiki></code> β†’ {{Armor|600}}
Β +
Β 
Β +
Custom icon size:
Β +
* <code><nowiki>{{Armor|6|16x16px}}</nowiki></code> β†’ {{Armor|6|16x16px}}
Β 
</noinclude>
Β 
</noinclude>

Latest revision as of 19:53, 10 October 2022

About

This template serves to display armor points in a page.

Usage

The syntax of this template is {{Armor|<number>|<size>}}. If the value is higher than 10, it will display n Γ— <armor> where n is the number you specified.

Examples

  • {{Armor|0}} β†’ 0 (πŸ›‘)
  • {{Armor|1}} β†’ 1 (πŸ›‘)
  • {{Armor|2}} β†’ 2 (πŸ›‘πŸ›‘)
  • {{Armor|3}} β†’ 3 (πŸ›‘πŸ›‘πŸ›‘)
  • {{Armor|4}} β†’ 4 (πŸ›‘πŸ›‘πŸ›‘πŸ›‘)
  • {{Armor|5}} β†’ 5 (πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘)
  • {{Armor|6}} β†’ 6 (πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘)

Rounding examples:

  • {{Armor|1.25}} β†’ 1.25 (πŸ›‘ Γ— 1.25)
  • {{Armor|1.5}} β†’ 1.5 (πŸ›‘ Γ— 1.5)
  • {{Armor|1.75}} β†’ 1.75 (πŸ›‘ Γ— 1.75)

More than 20 armor points:

  • {{Armor|20.5}} β†’ 20.5 (πŸ›‘ Γ— 20.5)
  • {{Armor|30} β†’ 30 (πŸ›‘ Γ— 30)
  • {{Armor|600}} β†’ 600 (πŸ›‘ Γ— 600)

Custom icon size:

  • {{Armor|6|16x16px}} β†’ 6 (πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘πŸ›‘)