Difference between revisions of "Item"

m
m
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#iferror:{{icon|{{{icon|{{{1}}}.png}}}}}<!-- if icon doesn't exist
+
<includeonly>{{#vardefine:item class<!-- define item class
-->|{{#if:{{#show:{{{link|{{{1}}}}}}|?Has icon}}|<span class="{{#switch:{{lc:{{{2|}}}}}
+
-->|{{#switch:{{lc:{{#if:{{{quality|{{{category|}}}}}}<!-- if quality parameter
 +
-->|{{{quality|{{{category|}}}}}}<!-- use quality parameter
 +
-->|{{#show:{{{1}}}|?Has quality}}<!-- else use 'Has quality' property
 +
-->}}}}
 
|common=quality-common
 
|common=quality-common
 
|uncommon=quality-uncommon
 
|uncommon=quality-uncommon
Line 6: Line 9:
 
|epic=quality-epic
 
|epic=quality-epic
 
|legendary=quality-legendary
 
|legendary=quality-legendary
|quest item=quality-quest-item
+
|quest item
}}">[[File:{{#show:{{{link|{{{1}}}}}}|?Has icon}}|25px]]</span><!-- use 'Has icon' property
+
|quest&nbsp;item=quality-quest-item<!-- TODO: quality property uses &nbsp; instead of 'real space' -->
-->|[[File:{{{1}}}.png|?]]}}<!-- handle non-existent icon
+
|#default=quality-common
-->|<span class="{{#switch:{{lc:{{{2|}}}}}
+
}}}}<!--
|common=quality-common
+
 
|uncommon=quality-uncommon
+
icon
|rare=quality-rare
+
-->{{#ifexist:File:{{{1}}}.png<!-- if icon exists
|epic=quality-epic
+
-->|<span class="{{#var:item class}}">{{icon|{{{icon|{{{1}}}.png}}}|{{{link|{{{1}}}}}}|25}}</span><!-- add icon with link
|legendary=quality-legendary
+
-->|{{#if:{{#show:{{{link|{{{1}}}}}}|?Has icon}}<!-- else if item has 'Has icon' property
|quest item=quality-quest-item
+
-->|<span class="{{#var:item class}}">[[File:{{#show:{{{link|{{{1}}}}}}|?Has icon}}|25px]]</span><!-- then use 'Has icon' property
}}">{{icon|{{{icon|{{{1}}}.png}}}|{{{link|{{{1}}}}}}|25}}}}</span><!-- add icon with link
+
-->|{{#ifeq:{{#explode:{{{1}}}|:|0}}|Recipe<!-- else if item is a recipe
 +
-->|{{Recipe icon|{{{1}}}|small=y|quality={{#var:item class}}}}<!-- use recipe icon
 +
-->|[[File:{{{1}}}.png|?]]}}}}}}<!-- else handle non-existent icon
 +
 
 +
label
 
-->{{#if:{{{nolabel|}}}||<!-- if no label is specified
 
-->{{#if:{{{nolabel|}}}||<!-- if no label is specified
 
-->&nbsp;{{#ifeq:{{lc:{{{link}}}}}|no<!-- if no link is specified
 
-->&nbsp;{{#ifeq:{{lc:{{{link}}}}}|no<!-- if no link is specified

Latest revision as of 11:35, 3 February 2024

Description[edit]

Displays a item's icon and name, with a link to the page of the item.

Usage[edit]

{{item|<Spine>|<common>|<icon=Spine.png>|<link=Spine>|<nolabel=yes>}}

Parameters[edit]

Arrow.png1: The name of the item.
Required.
Arrow.png2: The item's Quality.
Optional.
Arrow.pngicon: The item's icon.
Optional. Defaults to '{{{1}}}.png'.
Arrow.pnglink: The page link.
Optional. Defaults to '{{{1}}}'.
Notes: If set to 'no', label will be plaintext.
Arrow.pngnolabel: Determines whether the name of the item is shown.
Optional.
Notes: Set this parameter any value to hide label text.