Template:Inventory: Difference between revisions

264 bytes added ,  01:13, 22 July 2019
replaced third argument with an equipped boolean. added doc table
(removed named variables and added formatting)
(replaced third argument with an equipped boolean. added doc table)
Line 1: Line 1:
<noinclude>{{#cargo_declare:_table=Inventory|Item=String|Quantity=Integer|Owner=String}}[[Category:Templates]]</noinclude>
<noinclude>{{#cargo_declare:_table=Inventory|Item=String|Quantity=Integer|Equipped=Boolean}}[[Category:Templates]]</noinclude>
<includeonly>{{#cargo_store:_table=Inventory|Item={{{1|}}}|Quantity={{{2|1}}}|Owner={{{3|{{PAGENAME}}}}}}}</includeonly><p>[[{{{1}}}]]x{{{2|1}}}</p>
<includeonly>{{#cargo_store:_table=Inventory|Item={{{1|}}}|Quantity={{{2|1}}}|Equipped={{{3|yes}}}}}<p>[[{{{1}}}]]x{{{2|1}}} {{#ifeq:{{{3|yes}}} | yes | {{color | y |(equipped)}} }}</p></includeonly><noinclude>
{| class="wikitable"
! 1st argument
| item name. use string, it will auto link
|-
! 2nd argument
| quantity. defaults to 1
|-
! 3rd agument
| if the item is equipped. defaults to yes
|}</noinclude>