Difference between revisions of "Template:BoM"

From ChatWars Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{#vardefine: recipeSource|{{{source|{{PAGENAME}} }}} }}<!--
 
{{#vardefine: recipeSource|{{{source|{{PAGENAME}} }}} }}<!--
-->{{#vardefine: resourceList|}}<!--<includeonly>-->
+
-->{{#vardefine: resourceList|}}<includeonly>
 
{{#vardefine: resourceList | {{#ask:
 
{{#vardefine: resourceList | {{#ask:
  [[-Has subobject::Artisan Frame]] [[Crafting ingredient.ItemType::+]]
+
  [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::+]]
 
  |mainlabel=-
 
  |mainlabel=-
 
  |headers=hide
 
  |headers=hide
 
  |format=template
 
  |format=template
 
  |template=ResourceBreakdown
 
  |template=ResourceBreakdown
  |userparam=1
+
  |userparam=0;1
  |sort=Crafting ingredient
+
  |sort=Qty,Crafting ingredient
  |order=asc
+
  |order=desc,asc
 
  |?Crafting ingredient
 
  |?Crafting ingredient
 
  |?Qty
 
  |?Qty
 
}} }}
 
}} }}
 
{{#ask:
 
{{#ask:
  [[-Has subobject::Artisan Frame]] [[Crafting ingredient.ItemType::+]]
+
  [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::+]]
 
  |mainlabel=-
 
  |mainlabel=-
 
  |headers=hide
 
  |headers=hide
Line 20: Line 20:
 
  |template=ResourceBreakdown
 
  |template=ResourceBreakdown
 
  |userparam=0;1
 
  |userparam=0;1
  |sort=Crafting ingredient
+
  |sort=Qty,Crafting ingredient
  |order=asc
+
  |order=desc,asc
|sep=<br><br>
 
 
  |?Crafting ingredient
 
  |?Crafting ingredient
 
  |?Qty
 
  |?Qty
 
}}
 
}}
<!--</includeonly>--><noinclude>
+
</includeonly><noinclude>
 
Generates a BoM (Bill of Materials) for an item of the most basic resources.
 
Generates a BoM (Bill of Materials) for an item of the most basic resources.
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude>
 
</noinclude>

Revision as of 12:59, 5 September 2018

Generates a BoM (Bill of Materials) for an item of the most basic resources.