Template:Itemicon insert: Difference between revisions
Jump to navigation
Jump to search
(Remove name field for now) |
No edit summary |
||
(5 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
_table:item_icon | _table:item_icon | ||
|icon={{#if:{{{icon|}}}|{{{icon}}}|{{{image|}}} }} | |icon={{#if:{{{icon|}}}|{{{icon}}}|{{{image|}}} }} | ||
}}</onlyinclude></includeonly><noinclude> | |rarity={{{rarity|common}}} | ||
|uid={{{uid|}}} | |||
}}</onlyinclude></includeonly><noinclude>{{documentation|content= | |||
Inserts an icon into the Cargo item_icon database. Enables use of [[Template:ItemIcon]]. | Inserts an icon into the Cargo item_icon database. Enables use of [[Template:ItemIcon]]. | ||
Line 9: | Line 11: | ||
|icon=filename of the icon to use, without the File: prefix | |icon=filename of the icon to use, without the File: prefix | ||
|image=(optional) filename of the image to use as an icon, without the File: prefix. Overridden if "icon" is defined. Used for item template pages which may have an image configured but not an icon. | |image=(optional) filename of the image to use as an icon, without the File: prefix. Overridden if "icon" is defined. Used for item template pages which may have an image configured but not an icon. | ||
|rarity=the rarity of the item. One of (common,uncommon,rare, very rare,legendary,story). Defaults to common if not specified. | |||
}}</pre> | }}</pre> | ||
{{# | {{#cargo_declare: | ||
</noinclude> | _table = item_icon | ||
|rarity = String (allowed values=common,uncommon,rare, very rare,legendary,story) | |||
|icon = File | |||
|uid = String | |||
}} | |||
==Template data== | |||
<templatedata> | |||
{ | |||
"params": { | |||
"icon": { | |||
"description": "The icon file name, without the File: namespace.", | |||
"required": true | |||
}, | |||
"image": { | |||
"description": "An image for the item. This is usually a faded image. Unfaded images should be put into \"icon\". Is overridden by \"icon\"." | |||
}, | |||
"rarity": { | |||
"description": "The rarity of the item. Defaults to common.", | |||
"suggestedvalues": [ | |||
"common", | |||
"uncommon", | |||
"rare", | |||
"very rare" | |||
], | |||
"suggested": true | |||
}, | |||
"uid": { | |||
"description": "The unique id for the item. Can be used to query items that have multiple of the same display name.", | |||
"suggested": true | |||
} | |||
} | |||
} | |||
</templatedata> | |||
}}[[Category:Templates]]</noinclude> |
Latest revision as of 19:55, 14 April 2024
Template documentation
Inserts an icon into the Cargo item_icon database. Enables use of Template:ItemIcon.
Usage:{{ItemIcon Insert |icon=filename of the icon to use, without the File: prefix |image=(optional) filename of the image to use as an icon, without the File: prefix. Overridden if "icon" is defined. Used for item template pages which may have an image configured but not an icon. |rarity=the rarity of the item. One of (common,uncommon,rare, very rare,legendary,story). Defaults to common if not specified. }}
This template defines the table "item_icon". View table.
Template data
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
icon | icon | The icon file name, without the File: namespace. | Unknown | required |
image | image | An image for the item. This is usually a faded image. Unfaded images should be put into "icon". Is overridden by "icon". | Unknown | optional |
rarity | rarity | The rarity of the item. Defaults to common.
| Unknown | suggested |
uid | uid | The unique id for the item. Can be used to query items that have multiple of the same display name. | Unknown | suggested |