Template:ShopTableRow: Difference between revisions
Fix sprite - use item name directly with x2 size (via update-page on MediaWiki MCP Server) |
Use ItemSprite helper template for proper sprite lookup (via update-page on MediaWiki MCP Server) |
||
| Line 1: | Line 1: | ||
<includeonly>{{#cargo_store:_table=ItemSource|item={{{item|{{{1|}}}}}}|source={{{npc|{{{shop|{{PAGENAME}}}}}}}}|source_type=shop|cost={{{cost|}}}|currency={{{currency|Gold}}}}} | <includeonly>{{#cargo_store:_table=ItemSource|item={{{item|{{{1|}}}}}}|source={{{npc|{{{shop|{{PAGENAME}}}}}}}}|source_type=shop|cost={{{cost|}}}|currency={{{currency|Gold}}}}} | ||
|- | |- | ||
| style="text-align:center; width:64px;" | {{ | | style="text-align:center; width:64px;" | {{ItemSprite|{{{item|{{{1|}}}}}}|x2}} | ||
| [[{{{item|{{{1|}}}}}}]] | | [[{{{item|{{{1|}}}}}}]] | ||
| data-sort-value="{{{cost|0}}}" | {{Sprite|{{{currency|Gold}}}|x2}} {{{cost|}}}</includeonly><noinclude> | | data-sort-value="{{{cost|0}}}" | {{Sprite|{{{currency|Gold}}}|x2}} {{{cost|}}}</includeonly><noinclude> | ||
Latest revision as of 14:36, 1 February 2026
This template adds rows to the table "ItemSource", which is declared by the template ItemSource. View table. Stores shop item data to Cargo and outputs a table row. Use with Template:Tl and Template:Tl.
Usage
[edit source]{{ShopTableHeader}}
{{ShopTableRow|item=Iron Sword|cost=100}}
{{ShopTableRow|item=Health Potion|cost=50|currency=Tokens}}
{{ShopTableFooter}}
Parameters
[edit source]- item - The item being sold (required)
- cost - The price (required)
- currency - Currency type (defaults to Gold, shown as sprite)
- npc - The NPC selling this item (defaults to page name)