Module:UI/doc
This is the documentation page for Module:UI
Draws Factory interfaces. It has one so far, the crafting grid, which Module:Recipe table calls for {{Crafting}} (through Module:Crafting). Inspired by Minecraft Wiki's Module:UI. The look is in Template:Crafting/styles.css (TemplateStyles), which the grid adds itself.
crafting(args): the 8×4 input grid, the output slot and the cost.- The inputs are
A1toH4(columns A to H, rows 1 to 4) and the output isOutput. Each takes an item stack as described in Module:Factory slot, which draws the slots. A slot's link isA1linkand so on,Olinkfor the output. - The smallest rectangle that holds all inputs, at least 2×2, is drawn from the top-left corner as open slots; the rest of the 8×4 grid is drawn as locked slots.
costis the cost in Factory resources, formatted by Module:FormatNumber, so it follows the reader's number format (scientific notation or named numbers). It defaults to 0, and negative values show as 0.
- The inputs are
formatDoubleInteger(amount, nonNegative): an older formatter for counts (1.5E6, ∞). The grid only calls it whencostisn't a number, and then it returns a "NaN" error.