Module:Furnace multiblock: Difference between revisions

From Horizon's End Wiki
(Created page with "local p = {} local i18n = { defaultFuel = 'Any fuel', moduleArgs = Module:ProcessArgs, moduleRecipe = Module:Recipe table } 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.Input = args[1] args.Output = args[2] args.Fuel = args[3] p.i18n.type = args.type local ou...")
 
No edit summary
Line 18: Line 18:
end
end
args.Input = args[1]
    p.i18n.type = args[1]
args.Output = args[2]
args.Input = args[2]
args.Fuel = args[3]
args.Output = args[3]
    p.i18n.type = args.type
args.Fuel = args[4]
local out = recipeTable( args, {
local out = recipeTable( args, {

Revision as of 07:23, 14 August 2025

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

local p = {}

local i18n = {
	defaultFuel = 'Any fuel',
	moduleArgs = [[Module:ProcessArgs]],
	moduleRecipe = [[Module:Recipe table]]
}
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
	
    p.i18n.type = args[1]
	args.Input = args[2]
	args.Output = args[3]
	args.Fuel = args[4]
	
	local out = recipeTable( args, {
		uiFunc = 'furnace',
		type = i18n.type,
		ingredientArgs = { 'Input', 'Fuel' },
		outputArgs = { 'Output' },
	} )
	
	local title = mw.title.getCurrentTitle()
	
	return out, category
end

return p