Difference between revisions of "Template:BoM"

From ChatWars Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{#vardefine: recipeSource | {{{source|{{PAGENAME}} }}} }}{{#vardefine: outputMode | {{{mode|tree}}} }}<!--
 
{{#vardefine: recipeSource | {{{source|{{PAGENAME}} }}} }}{{#vardefine: outputMode | {{{mode|tree}}} }}<!--
 
-->{{#vardefine: resourceList|}}<includeonly><!--
 
-->{{#vardefine: resourceList|}}<includeonly><!--
-->{{#switch: {{#var: outputMode}}
+
--><div class="mw-collapsible mw-collapsed">{{#switch: {{#var: outputMode}}
 
   | tree | all = {{#ask:
 
   | tree | all = {{#ask:
 
                   [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::+]]
 
                   [[-Has subobject::{{#var: recipeSource}}]] [[Crafting ingredient.ItemType::+]]
Line 30: Line 30:
 
                     }}
 
                     }}
 
                 }}
 
                 }}
}}<!--
+
}}</div><!--
 
--></includeonly><noinclude>
 
--></includeonly><noinclude>
 
Generates a BoM (Bill of Materials) for an item. Has three modes:
 
Generates a BoM (Bill of Materials) for an item. Has three modes:

Revision as of 14:22, 5 September 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