local p = {}
p.infusionTable = function(f)
local args = require("Модуль:ProcessArgs").norm()
local mod = args["Мод"] or ""
local cellA1 = args["A1"] or args[1]
local cellB1 = args["B1"] or args[2]
local cellC1 = args["C1"] or args[3]
local cellA2 = args["A2"] or args[4]
local cellB2 = args["B2"] or args[5]
local cellC2 = args["C2"] or args[6]
local cellA3 = args["A3"] or args[7]
local cellB3 = args["B3"] or args[8]
local cellC3 = args["C3"] or args[9]
local cellOutput = args["Выход"]
local visAmount = args["Виз"] or "0"
local aspect1 = args["Аспект1"]
local aspect2 = args["Аспект2"]
local aspect3 = args["Аспект3"]
local aspect4 = args["Аспект4"]
local aspect5 = args["Аспект5"]
local numAspects = (
(aspect1 and 1 or 0)
+ (aspect2 and 1 or 0)
+ (aspect3 and 1 or 0)
+ (aspect4 and 1 or 0)
+ (aspect5 and 1 or 0)
)
local aspect1Left = 80 - (numAspects - 1) * 16
local aspect2Left = aspect1Left + 32
local aspect3Left = aspect2Left + 32
local aspect4Left = aspect3Left + 32
local aspect5Left = aspect4Left + 32
local cg = require("Модуль:Cg")
local cgSlot = cg.slot
local wandSlot = "thaum3:Посох ученика"
local visAmountN = tonumber(visAmount)
if visAmountN then
if visAmountN > 250 then
wandSlot = "thaum3:Посох подмастерья"
elseif visAmountN > 50 then
wandSlot = "thaum3:Посох грандмастера"
end
end
local output = {}
table.insert(output, cg.begin({
284,
192
}))
table.insert(output, cg.backgroundImage({
"Стол настаивания интерфейс (ThaumCraft).png"
}))
table.insert(output, cgSlot({cellA1, 40, 16, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellB1, 80, 16, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellC1, 120, 16, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellA2, 40, 56, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellB2, 80, 56, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellC2, 120, 56, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellA3, 40, 96, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellB3, 80, 96, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellC3, 120, 96, class2 = "invslot-plain", mod = mod}))
table.insert(output, cgSlot({cellOutput, 232, 56, class2 = "invslot-plain", mod = mod}))
table.insert(output, cg.text({
visAmount .. " vis", 212, 96,
style = "text-align: center; width: 72px; font-family: Minecraft; color: white; font-size: 8px"
}))
table.insert(output, cgSlot({wandSlot, 232, 122, class2 = "invslot-plain"}))
if (numAspects >= 1) then
table.insert(output, cgSlot({aspect1, aspect1Left, 144, class2 = "invslot-plain", mod = mod}))
end
if (numAspects >= 2) then
table.insert(output, cgSlot({aspect2, aspect2Left, 144, class2 = "invslot-plain", mod = mod}))
end
if (numAspects >= 3) then
table.insert(output, cgSlot({aspect3, aspect3Left, 144, class2 = "invslot-plain", mod = mod}))
end
if (numAspects >= 4) then
table.insert(output, cgSlot({aspect4, aspect4Left, 144, class2 = "invslot-plain", mod = mod}))
end
if (numAspects == 5) then
table.insert(output, cgSlot({aspect5, aspect5Left, 144, class2 = "invslot-plain", mod = mod}))
end
table.insert(output, cg.footer())
return table.concat(output)
end
return p
Advertisement
Модуль:Thaumcraft 3/Стол настаивания
Advertisement