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!

(Added numeric value before icons)
Line 1: Line 1:
{{#ifexpr: {{{1}}} > 0 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]] | {{#ifexpr: {{{1}}} = 0 or {{{1}}} < 0 | [[File:ui-armor-empty.png|12x12px|class=item-icon pixel|link=Armor]]}}}}{{#ifexpr: {{{1}}} > 1.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 2.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 3.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 4.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 5.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 6.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 7.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 8.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 9.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}<noinclude>
+
{{{1}}} ({{#ifexpr: {{{1}}} > 0 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]] | {{#ifexpr: {{{1}}} = 0 or {{{1}}} < 0 | [[File:ui-armor-empty.png|12x12px|class=item-icon pixel|link=Armor]]}}}}{{#ifexpr: {{{1}}} > 1.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 2.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 3.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 4.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 5.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 6.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 7.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 8.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}}{{#ifexpr: {{{1}}} > 9.49 | [[File:ui-armor.png|12x12px|class=item-icon pixel|link=Armor]]}})<noinclude>
 
== About ==
 
== About ==
 
This template serves to display armor points in a page.
 
This template serves to display armor points in a page.

Revision as of 13:37, 5 July 2022

{{{1}}} (Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".Expression error: Unrecognized punctuation character "{".)

About

This template serves to display armor points in a page.

Usage

The syntax of this template is {{Armor|<number>}}. If the value given is 0 or lower, it will display an empty armor icon, and if the value is higher than 10, it will display 10 armor icons. It can also round to the nearest integer.

Examples

  • {{Armor|0}} → 0 (Ui-armor-empty.png)
  • {{Armor|1}} → 1 (Ui-armor.png)
  • {{Armor|2}} → 2 (Ui-armor.pngUi-armor.png)
  • {{Armor|3}} → 3 (Ui-armor.pngUi-armor.pngUi-armor.png)
  • {{Armor|4}} → 4 (Ui-armor.pngUi-armor.pngUi-armor.pngUi-armor.png)
  • {{Armor|5}} → 5 (Ui-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.png)
  • {{Armor|6}} → 6 (Ui-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.png)
  • {{Armor|7}} → 7 (Ui-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.png)
  • {{Armor|8}} → 8 (Ui-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.png)
  • {{Armor|9}} → 9 (Ui-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.png)
  • {{Armor|10}} → 10 (Ui-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.pngUi-armor.png)

Rounding examples:

  • {{Armor|1.25}} → 1.25 (Ui-armor.png)
  • {{Armor|1.5}} → 1.5 (Ui-armor.pngUi-armor.png)
  • {{Armor|1.75}} → 1.75 (Ui-armor.pngUi-armor.png)