Модуль:Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 16: | Строка 16: | ||
local itemName = frame:preprocess("{{#invoke:Entity Lookup|getname|" .. id .. "}}") | local itemName = frame:preprocess("{{#invoke:Entity Lookup|getname|" .. id .. "}}") | ||
local prefix = args[2] or " " | local prefix = args[2] or "<nowiki></nowiki>" | ||
local size = args["size"] or "32px" | local size = args["size"] or "32px" | ||
| Строка 60: | Строка 60: | ||
local repository | local repository | ||
if input_repository == nil then | if input_repository == nil then | ||
repository = labelOutput | repository = labelOutput .. prefix | ||
else | else | ||
repository = table.concat({ | repository = table.concat({ | ||
labelOutput, | labelOutput, | ||
itemStack, | itemStack, | ||
prefix, | |||
itemContained, | itemContained, | ||
itemSlot, | itemSlot, | ||
| Строка 80: | Строка 81: | ||
else | else | ||
local pixel = string.match(size, "(%d+)") | local pixel = string.match(size, "(%d+)") | ||
local imageParam = args["image"] | local imageParam = args["image"] | ||
| Строка 102: | Строка 96: | ||
return frame:preprocess(string.format( | return frame:preprocess(string.format( | ||
"{{LinkCard|name=%s|image=%s|pixel=%s|link=%s|SideStyle=1}}", | "{{LinkCard|name=%s|image=%s|pixel=%s|link=%s|SideStyle=1}}", | ||
repository, imageParam, pixel, linkParam | |||
)) | )) | ||
end | end | ||