Jump to content

Module:Recipe table/doc

From The Perfect Tower II
Revision as of 01:49, 7 October 2026 by Speedybrain (talk | contribs) (Documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Recipe table

Builds recipe tables: one table row per recipe, with the recipe drawn by Module:UI. Module:Crafting uses it for {{Crafting}} on Factory/Recipes/Crafting. Inspired by Minecraft Wiki's Module:Recipe table.

table(args, opts) returns the table, or rows of a larger table. opts names the function in Module:UI that draws the recipe (uiMethod) and the argument names of the inputs (inputArgs) and outputs (outputArgs). args are the template's arguments:

  • Without head, continue or foot, the recipe is a table of its own. showName adds a Name column.
  • head starts a table, calls with continue add rows to it, and foot on the last call closes it. These tables are sortable and always have the Name column.
  • The Name cell lists the names of the output items; name replaces it. class adds classes to the table (on the call that starts it), such as mw-collapsed.

The tables carry the old class collapsible; MediaWiki:Common.js turns them into MediaWiki collapsibles. Item stacks are parsed by Module:Factory slot.