Template:EdibilityGrid: Difference between revisions
Appearance
imported>Margotbean attempt to fix floating quality stars in mobile view |
imported>Margotbean 1 too many </div>s |
||
| Line 15: | Line 15: | ||
{{#if:{{#pos:{{{hide|}}}|silver}}|| | {{#if:{{#pos:{{{hide|}}}|silver}}|| | ||
<tr> | <tr> | ||
<td><div id="qualitycontainersm"><div id="qualityimage">[[File:{{{1|Blank icon}}}.png|24px|link=]]<div class="qualityindicator">[[File:Silver Quality Icon.png|24px|link=]] | <td><div id="qualitycontainersm"><div id="qualityimage">[[File:{{{1|Blank icon}}}.png|24px|link=]]<div class="qualityindicator">[[File:Silver Quality Icon.png|24px|link=]]</div></div></div></td> | ||
<td>{{#ifexpr: {{{2|0}}} < 0 |[[File:Poison.png|20px|link=]]|[[File:Energy.png|20px|link=]]}}</td> | <td>{{#ifexpr: {{{2|0}}} < 0 |[[File:Poison.png|20px|link=]]|[[File:Energy.png|20px|link=]]}}</td> | ||
<td style="vertical-align: bottom; padding-right: 4px;">{{#replace:{{#expr:trunc(ceil({{{2|0}}}*2.5)+{{{2|0}}})}}|-|−}}</td> | <td style="vertical-align: bottom; padding-right: 4px;">{{#replace:{{#expr:trunc(ceil({{{2|0}}}*2.5)+{{{2|0}}})}}|-|−}}</td> | ||
Revision as of 01:30, 27 January 2023
Description
This template displays a grid of energy and health values for an edible item.
Parameters
| Parameter | Notes |
|---|---|
| First (unnamed) parameter | Name of image (minus ".png") |
| Second (unnamed) parameter | Edibility of item (can be found in ObjectInformation.xnb) Items with a negative edibility will display the poison icon instead of the energy icon. |
| quality | Single quality to display. Defaults to all qualities (normal, silver, gold, iridium) if omitted. Items that exist in normal quality only do not have to specify quality=normal (i.e., Cave Carrot, Ginger, Green Algae, Green Tea, Juice, Oil, Qi Fruit, Sap, and White Algae) Note: Other items may be added in the future. In the meantime, specifying quality=normal will work.
|
| hide | Qualities to hide (e.g., hide=silver,gold) |
| showitem | Set to true to display the image of the edible item |
| dsv | data-sort-value Set to false if the energy & health values are displayed in a non-sortable structure (like an infobox) Default value is true (the entire parameter can be omitted if a data-sort-value is desired). |
| health | Use to override the normal calculation for health, when the normal formula does not apply (e.g., for Bug Steak and Oil of Garlic) |
Examples
| Template Call | Result | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{EdibilityGrid|Melon|45}}
|
| ||||||||||||||||
{{EdibilityGrid|Melon|45|showitem=true}}
|
| ||||||||||||||||
{{EdibilityGrid|Parsnip|10}}
|
| ||||||||||||||||
{{EdibilityGrid|Ginger|10}}
|
| ||||||||||||||||
{{EdibilityGrid|Goat Cheese|50|hide=normal,silver}}
|
| ||||||||||||||||
{{EdibilityGrid|Large Goat Milk JA|35|showitem=true}}
|
| ||||||||||||||||
{{EdibilityGrid|Juice|30}}
|
| ||||||||||||||||
{{EdibilityGrid|Wine|20}}
|
| ||||||||||||||||
{{EdibilityGrid|Holly|-15}}
|
| ||||||||||||||||
{{EdibilityGrid|Bug Steak|18|quality=0}}
Missing health parameter; Shows incorrect health value |
| ||||||||||||||||
{{EdibilityGrid|Bug Steak|18|health=30|quality=0}}
|
|