Jump to content

Template:Health: Difference between revisions

From Stardew Valley Wiki
imported>Vg-tal
show the poison icon when the value is negative
imported>Margotbean
implement templatestyles
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><span id="nametemplate">{{#if:{{{1|}}}|
<includeonly><templatestyles src="Template:Health/styles.css" /><span class="healthtemplate">{{#iferror:{{#expr:{{{1|}}}<0}}|
{{#ifexpr:{{#expr:{{{1|}}}>-300 and {{{1|}}}<0}}|[[File:Poison.png|24px|link=]]|[[File:Health.png|24px|link=]]}}|[[File:Health.png|24px|link=]]}} {{{1|}}}{{#if: {{{2|}}}|&nbsp;({{{2|}}})|}}</span></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
    [[File:Health.png|24px|link=]]
    |
    {{#if:{{{1|}}}|
        {{#ifexpr:{{#expr:{{{1|}}}<0}}|
            [[File:Poison.png|24px|link=]]&nbsp;
            |
            [[File:Health.png|24px|link=]]
        }}
        |
        [[File:Health.png|24px|link=]]
    }}
}}{{{1|}}}</span></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>

Latest revision as of 20:09, 22 May 2021

Description

This template is used to insert File:Health.png inline with text. On the French language wiki, this template inserts File:Health FR.png inline with text.

Use

This template can be used by entering the following onto a relevant page.

{{Health|amount}}

Examples

{{Health}}

{{Health|100}}

100

{{Health|0}}

0

{{Health|-100}}

 -100