Template:Hungerbar: Difference between revisions

m (1 revision)
 
mNo edit summary
 
Line 1: Line 1:
<includeonly>{{iconbar
<includeonly>{{#invoke: iconbar | bar
| full  = {{ #if: {{{poisoned|}}} | Poisoned }} Hunger.png
| full  = {{ #if: {{{poisoned|}}} | Poisoned }} Hunger.svg
| half  = {{ #if: {{{poisoned|}}} | Poisoned }} Half Hunger.png
| half  = {{ #if: {{{poisoned|}}} | Poisoned }} Half Hunger.svg
| empty  = Empty Hunger.png
| empty  = Empty Hunger.svg
| size  = {{ #if: {{{2|}}} | {{{2}}} | 18px }}
| size  = {{ #if: {{{2|}}} | {{{2}}} | 18px }}
| value  = {{ #if: {{{1|}}} | {{{1}}} | 0 }}
| value  = {{{1|}}}
| reverse = 1
| reverse = 1
| min = {{{total|}}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{/doc}}
{{documentation}}
 
<!-- Put categories/interwiki on the documentation page -->
[[Category:Image templates]]
</noinclude>

Latest revision as of 13:21, 3 August 2015

[view | edit | history | purge]Documentation
This template uses Module:Iconbar, a script written in Lua.
Please see wp:Lua and mw:Extension:Scribunto to learn more.

This template creates a food point bar.

Parameter Function Default value
1 Integer health value between 0 and 32. 0 = None, 1 = one food point, 2 = two food points etc. 0
2 Width of each icon in CSS units like "px" or "em". 18px
poisoned Shows the poisoned hunger bar 0
total Minimum number of food points to display. 0
Code Result
{{hungerbar}} Empty Hunger.svg
{{hungerbar|0|9px}} Empty Hunger.svg
{{hungerbar|1}} Half Hunger.svg
{{hungerbar|1|9px|poisoned=1}} Poisoned Half Hunger.svg
{{hungerbar|2}} Hunger.svg
{{hungerbar|2|9px|poisoned=1}} Poisoned Hunger.svg
{{hungerbar|5}} Half Hunger.svgHunger.svgHunger.svg
{{hungerbar|5|poisoned=1}} Poisoned Half Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svg
{{hungerbar|10}} Hunger.svgHunger.svgHunger.svgHunger.svgHunger.svg
{{hungerbar|10|poisoned=1}} Poisoned Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svg
{{hungerbar|5|9px}} Half Hunger.svgHunger.svgHunger.svg
{{hungerbar|5|9px|poisoned=1}} Poisoned Half Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svg
{{hungerbar|7|45px}} Half Hunger.svgHunger.svgHunger.svgHunger.svg
{{hungerbar|7|45px|poisoned=1}} Poisoned Half Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svg
{{hungerbar|7|total=20}} Empty Hunger.svgEmpty Hunger.svgEmpty Hunger.svgEmpty Hunger.svgEmpty Hunger.svgEmpty Hunger.svgHalf Hunger.svgHunger.svgHunger.svgHunger.svg
{{hungerbar|7|total=20|poisoned=1}} Empty Hunger.svgEmpty Hunger.svgEmpty Hunger.svgEmpty Hunger.svgEmpty Hunger.svgEmpty Hunger.svgPoisoned Half Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svgPoisoned Hunger.svg

See also

[view | edit | history | purge]The above documentation is transcluded from Template:Hungerbar/doc.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis