Minecraft Wiki
Advertisement
[créer | historique | purger]Documentation
Ce module n'a pas de documentation. Si vous savez comment l'utiliser, merci de la créer.
local p = {}

local i18n = {
	categoryUpcoming = 'Catégorie:Fonctionnalité à venir',
	defaultBasePotion = 'Potion étrange',
	moduleArgs = [[Module:ProcessArgs]],
	moduleRecipe = [[Module:Tableau de recette]],
	type = 'Alchimie',
}
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['ingrédient'] = args[1]
	
	if not args.base then
		args.base = i18n.defaultBasePotion
	end
	
	if args.afficherbase then
		args['résultat1'] = args.base2
		args['résultat2'] = args.base
		args['résultat3'] = args.base3
	else
		args['résultat1'] = args[3]
		args['résultat2'] = args[2]
		args['résultat3'] = args[4]
	end
	
	local out = recipeTable( args, {
		uiFunc = 'brewingStand',
		type = i18n.type,
		ingredientArgs = { 'ingrédient', 'base' },
		outputArgs = { 'résultat1', 'résultat2', 'résultat3' },
	} )
	
	local title = mw.title.getCurrentTitle()
	local category
	if args['à venir'] and args.nocat ~= '1' and title.namespace == 0 and not title.isSubpage then
		category = '[[' .. i18n.categoryUpcoming .. ']]'
	end
	
	return out, category
end

return p
Advertisement