Template:ShopEntry: Difference between revisions
No edit summary |
Update ShopEntry to output table row alongside Cargo storage (via update-page on MediaWiki MCP Server) Tag: Reverted |
||
| 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;" | {{Sprite|{{{item|{{{1|}}}}}}}} | |||
| [[{{{item|{{{1|}}}}}}]] | |||
| data-sort-value="{{{cost|0}}}" | {{{cost|}}} {{{currency|Gold}}}</includeonly><noinclude> | |||
{{#cargo_attach:_table=ItemSource}} | {{#cargo_attach:_table=ItemSource}} | ||
Stores shop item data to the ItemSource Cargo table | Stores shop item data to the ItemSource Cargo table and outputs a table row. | ||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
{{ShopTableHeader}} | |||
{{ShopEntry|item=Iron Sword|cost=100}} | {{ShopEntry|item=Iron Sword|cost=100}} | ||
{{ShopEntry|item=Health Potion|cost=50|currency=Gold}} | {{ShopEntry|item=Health Potion|cost=50|currency=Gold}} | ||
{{ShopTableFooter}} | |||
</pre> | </pre> | ||
| Line 15: | Line 21: | ||
* '''npc''' - The NPC selling this item (defaults to page name) | * '''npc''' - The NPC selling this item (defaults to page name) | ||
[[Category: | [[Category:Shop templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 12:40, 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 the ItemSource Cargo table and outputs a table row.
Usage
{{ShopTableHeader}}
{{ShopEntry|item=Iron Sword|cost=100}}
{{ShopEntry|item=Health Potion|cost=50|currency=Gold}}
{{ShopTableFooter}}
Parameters
- item - The item being sold (required)
- cost - The price (required)
- currency - Currency type (defaults to Gold)
- npc - The NPC selling this item (defaults to page name)