(Новая страница: «local p = {} function p.industrialGrinder(f) local args = require("Модуль:ProcessArgs").norm() local mod = args["Мод"] or "" local cellIn1 = args["A…») |
Нет описания правки |
||
Строка 15: | Строка 15: | ||
local cellIn9 = args["C3"] |
local cellIn9 = args["C3"] |
||
local cellOut1 = args["Выход"] |
local cellOut1 = args["Выход"] |
||
+ | local shapeless = args["бесформенный"] or '' |
||
+ | local fixed = args["фиксированный"] or '' |
||
local cg = require("Модуль:Cg") |
local cg = require("Модуль:Cg") |
||
Строка 21: | Строка 23: | ||
local output = {} |
local output = {} |
||
− | table.insert(output, cg.begin({ |
+ | table.insert(output, cg.begin({ |
282, |
282, |
||
140 |
140 |
||
Строка 38: | Строка 40: | ||
table.insert(output, cgSlot({cellIn9, 99, 90, 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})) |
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, 147, 24, text = tooltip, text2 = tooltip2})) |
||
+ | end |
||
table.insert(output, cg.footer()) |
table.insert(output, cg.footer()) |
Версия от 11:41, 11 февраля 2018
local p = {}
function p.industrialGrinder(f)
local args = require("Модуль:ProcessArgs").norm()
local mod = args["Мод"] or ""
local cellIn1 = args["A1"]
local cellIn2 = args["A2"]
local cellIn3 = args["A3"]
local cellIn4 = args["B1"]
local cellIn5 = args["B2"]
local cellIn6 = args["B3"]
local cellIn7 = args["C1"]
local cellIn8 = args["C2"]
local cellIn9 = args["C3"]
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, 147, 24, text = tooltip, text2 = tooltip2}))
end
table.insert(output, cg.footer())
return table.concat(output)
end
return p