Difference between revisions of "Template:BoM"
Line 4: | Line 4: | ||
<div class="mw-collapsible-content" style="width: intrinsic; width: -moz-max-content; width: -webkit-max-content; text-align: left; white-space: nowrap;"> | <div class="mw-collapsible-content" style="width: intrinsic; width: -moz-max-content; width: -webkit-max-content; text-align: left; white-space: nowrap;"> | ||
− | {{# | + | {{#vardefine: outputBuffer |
| {{#ask: | | {{#ask: | ||
[[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::+]] [[Crafting ingredient.ItemType::!Recipe (Item)]] [[Crafting ingredient.ItemType::!Piece of Equipment]] | [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::+]] [[Crafting ingredient.ItemType::!Recipe (Item)]] [[Crafting ingredient.ItemType::!Piece of Equipment]] | ||
Line 20: | Line 20: | ||
<!-- tree style list of resources + intermediate steps--> | <!-- tree style list of resources + intermediate steps--> | ||
{{#switch: {{#var: outputMode}} | {{#switch: {{#var: outputMode}} | ||
− | | tree | all = | + | | tree | all = {{#var: outputBuffer}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}}<!-- | }}<!-- | ||
List of basic resources + mana usage | List of basic resources + mana usage |
Revision as of 15:11, 31 December 2018
Generates a BoM (Bill of Materials) for an item. Has three modes:
- Show the most basic resources with all amounts added up. (WIP, not possible without semantic wiki array extension)
- Show a tree style list with all the needed resources as child of the intermediate ingredient with different levels of indentation (done)
- Show both
Uses sub-template Template:ResourceBreakdown