Module:Crafting

From The Perfect Tower II
Jump to navigation Jump to search

Documentation for this module may be created at Module:Crafting/doc

-- Used to render Factory crafting recipes
-- Inspired by Minecraft Wiki's [[Module:Crafting]]
require("Module:No globals");

local getArgs = require("Module:Arguments").getArgs;
local recipeTable = require("Module:Recipe table").table;

local p = {};

local inputArgs = {
	"A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1",
	"A2", "B2", "C2", "D2", "E2", "F2", "G2", "H2",
	"A3", "B3", "C3", "D3", "E3", "F3", "G3", "H3",
	"A4", "B4", "C4", "D4", "E4", "F4", "G4", "H4",
};

function p.main(frame)
	local args = getArgs(frame, {
		frameOnly = false,
		wrappers = { "Template:Crafting" },
	});

	return recipeTable(args, {
		uiMethod = "crafting",
		inputArgs = inputArgs,
		outputArgs = { "Output" },
	});
end

return p;