Difference between revisions of "Template:Hunger"
(Display the empty hunger icon if value is equal or lower than 0, and added possibilty to change normal hunger icons for the poisoned one if using the parameter "poisoned") |
|||
Line 1: | Line 1: | ||
− | {{#ifexpr: {{{1}}} > 0 | [[File:ui-hunger{{#if: {{{poisoned}}}|-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}}} > 0 | [[File:ui-hunger{{#if: {{{poisoned}}}|-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{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 2.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 3.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 4.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 5.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 6.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}{{#ifexpr: {{{1}}} > 7.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}{{#ifexpr: {{{1}}} > 8.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}} |
{{#ifexpr: {{{1}}} > 9.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}<noinclude> | {{#ifexpr: {{{1}}} > 9.49 | [[File:ui-hunger{{#if: {{{poisoned}}}|-poisoned}}.png|12x12px|class=item-icon pixel|link=Hunger]]}}<noinclude> | ||
== About == | == About == |
Revision as of 11:42, 5 July 2022
{{#ifexpr: {{{1}}} > 0 | | 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 "{".{{#ifexpr: {{{1}}} > 7.49 | }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 (no value required), all hunger icons will change to it's poisoned version.
Examples
Rounding examples:
Poisoned examples: