Minecraft Wiki
(Отмена правки 658984, сделанной BloodCaster (обсуждение))
м (Откат правок Blitz (обсуждение) к версии BloodCaster)
Строка 4: Строка 4:
 
local args = require("Модуль:ProcessArgs").norm()
 
local args = require("Модуль:ProcessArgs").norm()
 
 
local mod = args["Мод"] or ""
+
local mod = args["Мод"] or "GregTech"
 
local cellIn1 = args["Вход1"]
 
local cellIn1 = args["Вход1"]
 
local cellIn2 = args["Вход2"]
 
local cellIn2 = args["Вход2"]

Версия от 09:14, 10 февраля 2018

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

function p.industrialGrinder(f)
	local args = require("Модуль:ProcessArgs").norm()
	
	local mod = args["Мод"] or "GregTech"
	local cellIn1 = args["Вход1"]
	local cellIn2 = args["Вход2"]
	local cellOut1 = args["Выход1"]
	local cellOut2 = args["Выход2"]
	local cellOut3 = args["Выход3"]
	local cellOut4 = args["Выход4"]
	local energyCost = args["Энергия"] or ""
	local processTime = args["Время"] or ""
	
	local energyDesc = "'''Энергия: "
		.. energyCost
		.. " [[IndustrialCraft 2/Энергия|еЭ]]'''"
	local timeDesc = "'''Время: "
		.. processTime
		.. " секунд'''"
	local processDesc = energyDesc .. "<br>" .. timeDesc
	
	local cg = require("Модуль:Cg")
	local cgSlot = cg.slot
	
	local output = {}
	
	table.insert(output, cg.begin({
		282,
		232
	}))
	table.insert(output, cg.backgroundImage({
		"Элементы интерфейса индустриальной центрифуги (GregTech 4).png"
	}))
	table.insert(output, cgSlot({cellIn1, 125, 78, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellIn2, 65, 18, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellOut1, 125, 18, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellOut2, 185, 78, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellOut3, 125, 138, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cgSlot({cellOut4, 65, 78, class2 = "invslot-plain", mod = mod}))
	table.insert(output, cg.text({processDesc, 18, 174, style = "text-align: left"}))
	table.insert(output, cg.machine({
		"GregTechMachineUILogo.png",
		232,
		182,
		text="Этот рецепт для индустриальной",
		text2="центрифуги из модификации GregTech 4.",
		link="GregTech 4/Индустриальная центрифуга"
	}))
	
	table.insert(output, cg.footer())
	
	return table.concat(output)
end

return p