Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Stonecutting: Difference between revisions

From Mine in Abyss
minecraft>ItsPlantseed
m Shortened title
 
m 1 revision imported
 
(No difference)

Latest revision as of 12:46, 11 October 2024

This module implements {{stonecutting}}.

Dependencies[edit source]

See also[edit source]


de:Modul:Steinsägerezept es:Módulo:Stonecutting fr:Module:Taillage it:Modulo:Intaglio ja:モジュール:Stonecutting ko:모듈:Stonecutting lzh:模組:Stonecutting pt:Módulo:Stonecutting ru:Модуль:Резка камня th:มอดูล:Stonecutting uk:Модуль:Обрізка zh:Module:Stonecutting



local p = {}

local i18n = {
	categoryUpcoming = 'Category:Upcoming',
	moduleArgs = [[Module:ProcessArgs]],
	moduleRecipe = [[Module:Recipe table]],
	type = 'Cutting',
}
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]
	
	local out = recipeTable( args, {
		uiFunc = 'stonecutter',
		type = i18n.type,
		ingredientArgs = { 'Input' },
		outputArgs = { 'Output' },
	} )
	
	local title = mw.title.getCurrentTitle()
	local category
	if args.upcoming and args.nocat ~= '1' and title.namespace == 0 and not title.isSubpage then
		category = '[[' .. i18n.categoryUpcoming .. ']]'
	end
	
	return out, category
end

return p