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

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

	local mod = args["Мод"] or ""
	local mode = args["Режим"] or "1"
	local containerin = args["Вход"]
	local containerout = args["Выход"]
	local liquid = args["Жидкость"]
	local volume = args["Объём"] or ""
	local energy = args["Энергия"] or ""
	local verste = args["Версия"] or "5"
	
	if mode == "1" then
		progressImage = "[[Файл:Процесс наполнения (Thermal Expansion 5).gif|link=]]"
		modeImage = "[[Файл:Режим наполнения (Thermal Expansion 5).png|link=]]"
	else
		progressImage = "[[Файл:Процесс плавления (Thermal Expansion 5).gif|link=]]"
		modeImage = "[[Файл:Режим опустошения (Thermal Expansion 5).png|link=]]"
	end
	
	
	if verste <= "2" then
		unitlnk = "[[Minecraft Joules|MJ]]"
		unit = "MJ"
	else
		unitlnk = "[[Redstone Flux|RF]]"
		unit = "RF"
	end
	
	local descText = "[[Thermal Expansion ".. verste .."/Распределитель жидкости|Распределитель жидкости]]"
	local descStyle = "font-family: Minecraft-ru; text-align: center; width:280px; font-size: 15px"
	local volumeText = "<span title=\"Объём жидкости, " .. volume .. " В.\" "
			.. "style=\"font-family: Minecraft-ru; cursor: help\">"
			.. volume .. "В</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 cgliquidSlot = cg.liquidSlot
	
	local output = {}

-- указание размеров подложки
	table.insert(output, cg.begin({
		280,
		168
	}))
	table.insert(output, cg.backgroundImage({
		"Элементы интерфейса распределителя жидкости (Thermal Expansion).png"
	}))
	
	if verste <= "3" then
	table.insert(output, cgSlot({containerin, 86, 50, mod = mod}))
	else
	table.insert(output, cgSlot({containerin, 14, 50, mod = mod}))
	end
	
	table.insert(output, cgSlot({containerout, 86, 110, class2 = "invslot-plain", mod = mod}))	
	table.insert(output, cgliquidSlot({liquid, 230, 40, volume = volume}))
	table.insert(output, cg.image({progressImage, 152, 52}))
	table.insert(output, cg.image({modeImage, 160, 112}))
	table.insert(output, cgText({descText, 0, 8, style=descStyle}))
	table.insert(output, cgText({volumeText, 230, 28, style="width: 36px; text-align: center; font-size: 12px"}))
	table.insert(output, cgText({energyText, 130, 84, style="width: 100px; text-align: center"}))
	table.insert(output, cg.footer())
	
	return table.concat(output)
end

return p
Advertisement