Module:Repairing

From Downtime Wiki
Revision as of 17:25, 12 January 2025 by MC>BabylonAS (Created page with "local p = {} local i18n = { moduleArgs = Module:ProcessArgs, moduleRecipe = Module:Recipe table, type = 'Anvil', } p.i18n = i18n local recipeTable = require(i18n.moduleRecipe).table function p.table(f) local args = f if f == mw.getCurrentFrame() then args = require(i18n.moduleArgs).merge(true) else f = mw.getCurrentFrame() end args.Input1 = args[1] args.Input2 = args[2] args.Output = args[3] args.foot = args.foot or args.tail local out =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{#if:{{#pos:Repairing|/sandbox}}|| pt:Módulo:Repairing

}}


local p = {}

local i18n = {
	moduleArgs = [[Module:ProcessArgs]],
	moduleRecipe = [[Module:Recipe table]],
	type = 'Anvil',
}
p.i18n = i18n

local recipeTable = require(i18n.moduleRecipe).table

function p.table(f)
	local args = f
	if f == mw.getCurrentFrame() then
		args = require(i18n.moduleArgs).merge(true)
	else
		f = mw.getCurrentFrame()
	end
	
	args.Input1 = args[1]
	args.Input2 = args[2]
	args.Output = args[3]
	
	args.foot = args.foot or args.tail
	
	local out = recipeTable(args, {
		uiFunc = 'anvil',
		type = i18n.type,
		ingredientArgs = { 'Input1', 'Input2' },
		outputArgs = { 'Output' },
	})
	return out
end

return p