Minecraft Wiki
Регистрация
Advertisement
[создать | история | обновить]Документация
У этого модуля нет документации. Если вы знаете, как использовать этот модуль, пожалуйста, добавьте соответствующую информацию.
local p = {}

function p.industrialGrinder(f)
	local args = require("Модуль:ProcessArgs").norm()

	local mod = args["Мод"] or ""
	local cellIn1 = args["A1"] or args[1]
	local cellIn2 = args["A2"] or args[2]
	local cellIn3 = args["A3"] or args[3]
	local cellIn4 = args["B1"] or args[4]
	local cellIn5 = args["B2"] or args[5]
	local cellIn6 = args["B3"] or args[6]
	local cellIn7 = args["C1"] or args[7]
	local cellIn8 = args["C2"] or args[8]
	local cellIn9 = args["C3"] or args[9]
	local cellOut1 = args["Выход"]
	local shapeless = args["бесформенный"] or ''
	local fixed = args["фиксированный"] or ''

	local cg = require("Модуль:Cg")
	local cgSlot = cg.slot
	
	local output = {}

	table.insert(output, cg.begin({
		282,
		140
	}))
	table.insert(output, cg.backgroundImage({
		"Элементы интерфейса верстака.png"
	}))
	table.insert(output, cgSlot({cellIn1, 27, 18, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn2, 27, 54, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn3, 27, 90, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn4, 63, 18, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn5, 63, 54, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn6, 63, 90, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn7, 99, 18, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn8, 99, 54, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn9, 99, 90, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellOut1, 215, 54, class2 = "invslot-plain", mod = mod}))
	
	local isShapeless = shapeless ~= ''
	local isFixed = fixed ~= ''
	if isShapeless or isFixed then
		local file, tooltip, tooltip2
		if isShapeless then
			file = "Grid layout Shapeless.png"
			tooltip = "Этот рецепт бесформенный, ресурсы могут"
			tooltip2 = "располагаться в сетке верстака в любом порядке."
		else -- if isFixed
			local notFixed = args["нефиксировано"] or '' -- указывайте в родительном падеже
			local exceptFixed = ''
			if notFixed ~= '' then
				exceptFixed = ", за исключением " .. notFixed
			end
			file = "Grid layout Fixed.png"
			tooltip = "Этот рецепт фиксированный, его ингредиенты не могут"
			tooltip2 = "быть перемещены или зеркально отражены" .. exceptFixed .. "."
		end
		table.insert(output, cg.machine({file, 250, 8, text = tooltip, text2 = tooltip2}))
	end

	table.insert(output, cg.footer())

	return table.concat(output)
end

return p
Advertisement