KnottyManatee55 (обс. | вклад) мНет описания правки Метка: отменено |
KnottyManatee55 (обс. | вклад) мНет описания правки Метка: отменено |
||
| Строка 26: | Строка 26: | ||
frame = 1 |
frame = 1 |
||
end |
end |
||
| − | if verste == nil then |
+ | if verste == "nil" then |
link = "[[Thermal Expansion/Лесопилка|Лесопилка]]" |
link = "[[Thermal Expansion/Лесопилка|Лесопилка]]" |
||
else |
else |
||
Версия от 18:17, 14 ноября 2022
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 <= "2" then
unitlnk = "[[Minecraft Joules|MJ]]"
unit = "MJ"
else
unitlnk = "[[Redstone Flux|RF]]"
unit = "RF"
end
if verste == "5" then
frame = 2
else
frame = 1
end
if verste == "nil" 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