模板:Rarity:修订间差异

(创建页面,内容为“<includeonly><!-- -->{{#cargo_store:_table=Rarities|sortorder=0|name=Varies}}<!-- -->{{#cargo_store:_table=Rarities|sortorder=1|name=Common}}<!-- -->{{#cargo_store:_table=Rarities|sortorder=2|name=Rare}}<!-- -->{{#cargo_store:_table=Rarities|sortorder=3|name=Epic}}<!-- -->{{#cargo_store:_table=Rarities|sortorder=4|name=Legendary}}<!-- -->{{#cargo_store:_table=Rarities|sortorder=5|name=Godly}}<!-- -->{{#cargo_store:_table=Rarities|sortorder=6|name=Unique}}<!-- -…”)
 
(已保护“模板:Rarity”([编辑=仅允许管理员](无限期)))
 
(没有差异)

2024年4月3日 (三) 16:18的最新版本

此模板定义表格“Rarities”。 查看表格.

This template is intended to hold the sort orders for each rarity value.

e.g. Common - 1, Rare - 2

The sort order is intended to be used for tables that use the Cargo extension.

{{#cargo_query:
tables=Items=I,Rarities=R
|join on=I.rarity=R.name
|fields
=I.name
,I.rarity
,R.sortorder
|format=template
|template=item table/row
|named args=yes

Then the sort order can be used in templates like so:

|data-sort-value="{{{sortorder}}}"|{{{rarity}}}

Template:Item_table/row