Difference between revisions of "Template:Hunger"

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!

Line 1: Line 1:
{{{1}}} ({{#ifexpr: {{{1}}} > 0 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]] | {{#ifexpr: {{{1}}} = 0 or {{{1}}} < 0 | [[File:ui-hunger-empty.png|12x12px|class=item-icon pixel|link=Hunger]]}}}}{{#ifexpr: {{{1}}} > 1.5 or {{{1}}} = 1.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 2.5 or {{{1}}} = 2.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 3.5 or {{{1}}} = 3.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 4.5 or {{{1}}} = 4.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 5.5 or {{{1}}} = 5.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 6.5 or {{{1}}} = 6.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 7.5 or {{{1}}} = 7.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 8.5 or {{{1}}} 8.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 9.5 and {{{1}}} < 10 or {{{1}}} = 9.5 or {{{1}}} = 10 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]] | {{{1}}} × [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}})<noinclude>
+
{{{1}}} ({{#ifexpr: {{{1}}} > 0 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]] | {{#ifexpr: {{{1}}} = 0 or {{{1}}} < 0 | [[File:ui-hunger-empty.png|12x12px|class=item-icon pixel|link=Hunger]]}}}}
 +
{{#ifexpr: {{{1}}} > 1.5 or {{{1}}} = 1.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}
 +
}{{#ifexpr: {{{1}}} > 2.5 or {{{1}}} = 2.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}
 +
{{#ifexpr: {{{1}}} > 3.5 or {{{1}}} = 3.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}
 +
{{#ifexpr: {{{1}}} > 4.5 or {{{1}}} = 4.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}
 +
{{#ifexpr: {{{1}}} > 5.5 or {{{1}}} = 5.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}
 +
{{#ifexpr: {{{1}}} > 6.5 or {{{1}}} = 6.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}
 +
{{#ifexpr: {{{1}}} > 7.5 or {{{1}}} = 7.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}
 +
{{#ifexpr: {{{1}}} > 8.5 or {{{1}}} 8.5 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}
 +
{{#ifexpr: {{{1}}} > 9.5 and {{{1}}} < 10 or {{{1}}} = 9.5 or {{{1}}} = 10 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]|{{{1}}} × [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}})<noinclude>
 
== About ==
 
== About ==
 
This template serves to display hunger points in a page.
 
This template serves to display hunger points in a page.

Revision as of 19:35, 5 July 2022

{{{1}}} (Expression error: Unrecognized punctuation character "{". {{#ifexpr: {{{1}}} > 1.5 or {{{1}}} = 1.5 | Ui-hunger.png} }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 hunger points in a page.

Usage

The syntax of this template is {{Hunger|<number>|<poisoned>?}}. If the value given is 0 or lower, it will display nothing, and if the value is higher than 10, it will display 10 hunger icons. It can also round to the nearest integer. When using the poisoned parameter with the true value, all hunger icons will change to it's poisoned version.

Examples

  • {{Hunger|0}} → 0 (Ui-hunger-empty.png

{{#ifexpr: 0 > 1.5 or 0 = 1.5 | Ui-hunger.png} }



Expression error: Unexpected number. 0 × Ui-hunger.png)

  • {{Hunger|1}} → 1 (Ui-hunger.png

{{#ifexpr: 1 > 1.5 or 1 = 1.5 | Ui-hunger.png} }



Expression error: Unexpected number. 1 × Ui-hunger.png)

  • {{Hunger|2}} → 2 (Ui-hunger.png

{{#ifexpr: 2 > 1.5 or 2 = 1.5 | Ui-hunger.png} }



Expression error: Unexpected number. 2 × Ui-hunger.png)

  • {{Hunger|3}} → 3 (Ui-hunger.png

{{#ifexpr: 3 > 1.5 or 3 = 1.5 | Ui-hunger.png} }Ui-hunger.png



Expression error: Unexpected number. 3 × Ui-hunger.png)

  • {{Hunger|4}} → 4 (Ui-hunger.png

{{#ifexpr: 4 > 1.5 or 4 = 1.5 | Ui-hunger.png} }Ui-hunger.png Ui-hunger.png



Expression error: Unexpected number. 4 × Ui-hunger.png)

  • {{Hunger|5}} → 5 (Ui-hunger.png

{{#ifexpr: 5 > 1.5 or 5 = 1.5 | Ui-hunger.png} }Ui-hunger.png Ui-hunger.png Ui-hunger.png


Expression error: Unexpected number. 5 × Ui-hunger.png)

  • {{Hunger|6}} → 6 (Ui-hunger.png

{{#ifexpr: 6 > 1.5 or 6 = 1.5 | Ui-hunger.png} }Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png


Expression error: Unexpected number. 6 × Ui-hunger.png)

  • {{Hunger|7}} → 7 (Ui-hunger.png

{{#ifexpr: 7 > 1.5 or 7 = 1.5 | Ui-hunger.png} }Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png

Expression error: Unexpected number. 7 × Ui-hunger.png)

  • {{Hunger|8}} → 8 (Ui-hunger.png

{{#ifexpr: 8 > 1.5 or 8 = 1.5 | Ui-hunger.png} }Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Expression error: Unexpected number. 8 × Ui-hunger.png)

  • {{Hunger|9}} → 9 (Ui-hunger.png

{{#ifexpr: 9 > 1.5 or 9 = 1.5 | Ui-hunger.png} }Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Expression error: Unexpected number. 9 × Ui-hunger.png)

  • {{Hunger|10}} → 10 (Ui-hunger.png

{{#ifexpr: 10 > 1.5 or 10 = 1.5 | Ui-hunger.png} }Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Expression error: Unexpected number. Ui-hunger.png)

Rounding examples:

  • {{Hunger|1.25}} → 1.25 (Ui-hunger.png

{{#ifexpr: 1.25 > 1.5 or 1.25 = 1.5 | Ui-hunger.png} }



Expression error: Unexpected number. 1.25 × Ui-hunger.png)

  • {{Hunger|1.5}} → 1.5 (Ui-hunger.png

{{#ifexpr: 1.5 > 1.5 or 1.5 = 1.5 | Ui-hunger.png} }



Expression error: Unexpected number. 1.5 × Ui-hunger.png)

  • {{Hunger|1.75}} → 14 (Ui-hunger.png

{{#ifexpr: 14 > 1.5 or 14 = 1.5 | Ui-hunger.png} }Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Ui-hunger.png Expression error: Unexpected number. 14 × Ui-hunger.png)

Poisoned examples:

  • {{Hunger|5|poisoned=true}} → 5 (Ui-hunger-poisoned.png

{{#ifexpr: 5 > 1.5 or 5 = 1.5 | Ui-hunger-poisoned.png} }Ui-hunger-poisoned.png Ui-hunger-poisoned.png Ui-hunger-poisoned.png


Expression error: Unexpected number. 5 × Ui-hunger-poisoned.png)

  • {{Hunger|6.5|poisoned=true}} → 6.5 (Ui-hunger-poisoned.png

{{#ifexpr: 6.5 > 1.5 or 6.5 = 1.5 | Ui-hunger-poisoned.png} }Ui-hunger-poisoned.png Ui-hunger-poisoned.png Ui-hunger-poisoned.png Ui-hunger-poisoned.png Ui-hunger-poisoned.png

Expression error: Unexpected number. 6.5 × Ui-hunger-poisoned.png)

  • {{Hunger|3|poisoned=true}} → 3 (Ui-hunger-poisoned.png

{{#ifexpr: 3 > 1.5 or 3 = 1.5 | Ui-hunger-poisoned.png} }Ui-hunger-poisoned.png



Expression error: Unexpected number. 3 × Ui-hunger-poisoned.png)