Difference between revisions of "Item"
Stratonian (talk | contribs) m (recipe icon) |
Stratonian (talk | contribs) m (better item quality) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{# | + | <includeonly>{{#vardefine:quality class|{{#if:{{{2|}}}<!-- if quality parameter exists |
− | + | -->|{{#switch:{{lc:{{{2|}}}}} | |
− | -->| | ||
|common=quality-common | |common=quality-common | ||
|uncommon=quality-uncommon | |uncommon=quality-uncommon | ||
Line 8: | Line 7: | ||
|legendary=quality-legendary | |legendary=quality-legendary | ||
|quest item=quality-quest-item | |quest item=quality-quest-item | ||
− | }}">[[File:{{#show:{{{link|{{{1}}}}}}|?Has icon}}|25px]]</span><!-- then use 'Has icon' property | + | }}<!-- use the quality |
+ | -->|{{#show:{{{1}}}|?Has quality}}}}}}<!-- else get 'Has quality' property | ||
+ | -->{{#iferror:{{icon|{{{icon|{{{1}}}.png}}}}}<!-- if icon doesn't exist | ||
+ | -->|{{#if:{{#show:{{{link|{{{1}}}}}}|?Has icon}}<!-- if item has 'Has icon' property | ||
+ | -->|<span class="{{#var:quality class}}">[[File:{{#show:{{{link|{{{1}}}}}}|?Has icon}}|25px]]</span><!-- then use 'Has icon' property | ||
-->|{{#ifeq:{{#explode:{{{1}}}|:|0}}|Recipe<!-- else if item is a recipe | -->|{{#ifeq:{{#explode:{{{1}}}|:|0}}|Recipe<!-- else if item is a recipe | ||
− | -->|{{Recipe icon|{{{1}}}|small=y|quality={{# | + | -->|{{Recipe icon|{{{1}}}|small=y|quality={{#var:quality class}}}}<!-- use recipe icon |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }}}}<!-- use recipe icon | ||
-->|[[File:{{{1}}}.png|?]]}}}}<!-- else handle non-existent icon | -->|[[File:{{{1}}}.png|?]]}}}}<!-- else handle non-existent icon | ||
− | -->|<span class="{{# | + | -->|<span class="{{#var:quality class}}">{{icon|{{{icon|{{{1}}}.png}}}|{{{link|{{{1}}}}}}|25}}}}</span><!-- add icon with link |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }}">{{icon|{{{icon|{{{1}}}.png}}}|{{{link|{{{1}}}}}}|25}}}}</span><!-- add icon with link | ||
-->{{#if:{{{nolabel|}}}||<!-- if no label is specified | -->{{#if:{{{nolabel|}}}||<!-- if no label is specified | ||
--> {{#ifeq:{{lc:{{{link}}}}}|no<!-- if no link is specified | --> {{#ifeq:{{lc:{{{link}}}}}|no<!-- if no link is specified |
Revision as of 19:59, 12 January 2024
Description
Displays a item's icon and name, with a link to the page of the item.
Usage
{{item|<Spine>|<common>|<icon=Spine.png>|<link=Spine>|<nolabel=yes>}}
Parameters
- 2: The item's Quality.
- Optional.