Template:ItemBox: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
QuinnBinn (talk | contribs)
m Made item name into links
QuinnBinn (talk | contribs)
m Added a display name param for specific items with clashing names
Line 27: Line 27:
  | Spirit = background-color: #FFEFD7; color: #131610;
  | Spirit = background-color: #FFEFD7; color: #131610;
  | background-color: #FFF0D7; color: #151912;}}"
  | background-color: #FFF0D7; color: #151912;}}"
! [[{{{item_name}}}]]
! {{#if:{{{display_name|}}}|[[{{{item_name}}}|{{{display_name}}}]]|[[{{{item_name}}}]]}}
|}</div></onlyinclude>
|}</div></onlyinclude>


Line 33: Line 33:
A port of the initial box in [[Template:Infobox item]] with links, for use on pages that could use it without the whole infobox.
A port of the initial box in [[Template:Infobox item]] with links, for use on pages that could use it without the whole infobox.


{{ItemBox|item_name = Spirit Armor|item_type = Vitality|item_imagefilepath = Spirit Armor|item_price = 1250}} {{ItemBox|item_name = Basic Magazine|item_type = Weapon|item_imagefilepath = Basic Magazine|item_price = 500}} {{ItemBox|item_name = Improved Cooldown|item_type = Spirit|item_price = 1250}}
{{ItemBox|item_name = Bullet Lifesteal (item)|item_type = Vitality|item_price = 1250|display_name = Bullet Lifesteal}} {{ItemBox|item_name = Basic Magazine|item_type = Weapon|item_imagefilepath = Basic Magazine|item_price = 500}} {{ItemBox|item_name = Improved Cooldown|item_type = Spirit|item_price = 1250}}
<noinclude>
<templatedata>
{
"params": {
"item_type": {
"description": "What category of Item is this?",
"example": "Spirit",
"type": "string",
"suggestedvalues": [
"Weapon",
"Vitality",
"Spirit"
],
"required": true
},
"item_price": {
"description": "How much does this item cost in souls?",
"example": "500",
"type": "number",
"required": true
},
"item_name": {
"description": "Name of the item",
"example": "Basic Magazine",
"type": "string",
"required": true
},
"display_name": {
"description": "The display name of the item (for special cases such as Bullet Lifesteal (item) or Spirit Lifesteal (item))",
"example": "Bullet Lifesteal",
"type": "string"
}
},
"paramOrder": [
"item_name",
"item_type",
"item_price",
"display_name"
]
}
</templatedata>
</noinclude>

Revision as of 08:01, 2 September 2024

Souls{{{item_price}}}
[[File:{{{item_name}}}.png|50px|link={{{item_name}}}]]
[[{{{item_name}}}]]


A port of the initial box in Template:Infobox item with links, for use on pages that could use it without the whole infobox.


Souls1250
Bullet Lifesteal
Souls500
Basic Magazine
Souls1250
Improved Cooldown

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
item_nameitem_name

Name of the item

Example
Basic Magazine
Stringrequired
item_typeitem_type

What category of Item is this?

Suggested values
Weapon Vitality Spirit
Example
Spirit
Stringrequired
item_priceitem_price

How much does this item cost in souls?

Example
500
Numberrequired
display_namedisplay_name

The display name of the item (for special cases such as Bullet Lifesteal (item) or Spirit Lifesteal (item))

Example
Bullet Lifesteal
Stringoptional