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

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

	local mod = args["Мод"] or ""
	local cellIn1 = args["Вход"]
	local cellOut1 = args["Выход"]
	local cellOut2 = args["Выход2"]
	local chance = args["Шанс"] or ""
	local energy = args["Энергия"] or ""
	local verste = args["Версия"] or ""
	local progressImage = "[[Файл:layout Furnace Progress.gif|link=]]"
	
	if verste >= "3" then
		unitlnk = "[[Redstone Flux|RF]]"
		unit = "RF"
	else
		unitlnk = "[[Minecraft Joules|MJ]]"
		unit = "MJ"
	end

	if energy == "" then
		unitlnk = ""
	end

	if verste == "5" or "0" then
		frame = 2
	else
		frame = 1
	end

	if verste == "" then
		link = "[[Thermal Expansion/Лесопилка|Лесопилка]]"
	else
		link = "[[Thermal Expansion ".. verste .."/Лесопилка|Лесопилка]]"
	end

	local descText = link
	local descStyle = "font-family: Minecraft-ru; text-align: center; width:228px; color: black"
	local chanceText = "<span title=\"Шанс получения побочного продукта, " .. chance .. ".\" "
			.. "style=\"font-family: Minecraft-ru; cursor: help\">"
			.. chance .. "</span>"
	local energyText = "<span title=\"Требуемая энергия, " .. energy .." "..unit..".\" "
			.. "style=\"font-family: Minecraft-ru; cursor: help\">"
			.. energy .." "..unitlnk.."</span>"

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

-- указание размеров подложки
	table.insert(output, cg.begin({
		228,
		154
	}))
	table.insert(output, cg.backgroundImage({
		"Элементы интерфейса лесопилки ".. frame .." (Thermal Expansion).png"
	}))
	table.insert(output, cgSlot({cellIn1, 14, 50, mod = mod}))
	table.insert(output, cgSlot({cellOut1, 134, 50, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellOut2, 134, 104, mod = mod}))
	table.insert(output, cg.image({progressImage, 64, 68}))
	table.insert(output, cgText({descText, 0, 8, style=descStyle}))
	table.insert(output, cgText({chanceText, 168, 108, style="width: 52px; text-align: center; color: black"}))
	table.insert(output, cgText({energyText, 44, 108, style="width: 90px; text-align: center; color: black"}))
	table.insert(output, cg.footer())
	return table.concat(output)
end

return p
Advertisement