Difference between revisions of "Template:Hunger"
(Added numeric value before icons) |
|||
Line 1: | Line 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.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 2.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 3.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 4.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 5.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 6.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 7.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 8.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 9.49 | [[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.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 2.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 3.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 4.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 5.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 6.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 7.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 8.49 | [[File:ui-hunger{{#ifeq: {{{poisoned}}}|true|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 9.49 | [[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 13:38, 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 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 (){{Hunger|1}}
→ 1 (){{Hunger|2}}
→ 2 (){{Hunger|3}}
→ 3 (){{Hunger|4}}
→ 4 (){{Hunger|5}}
→ 5 (){{Hunger|6}}
→ 6 (){{Hunger|7}}
→ 7 (){{Hunger|8}}
→ 8 (){{Hunger|9}}
→ 9 (){{Hunger|10}}
→ 10 ()
Rounding examples:
Poisoned examples: