Модуль:Entity Lookup: различия между версиями

Нет описания правки
Нет описания правки
Строка 60: Строка 60:
         meta = "64x64px|link="
         meta = "64x64px|link="
     end
     end
    meta = meta:gsub(',', '|')
    pic = "[[" .. frame.args[1] .. "|" .. meta .. "]]"
     if entity ~= nil then do
     if entity ~= nil then do
        meta = meta:gsub(',', '|')
     if frame.args[1] ~= nil then do
     if frame.args[1] ~= nil then do
    pic = "[[" .. frame.args[1] .. "|" .. meta .. "]]"
     out =  frame:expandTemplate{ title = "Tooltip", args = { pic, entity.name, entity.desc, stats }}
     out =  frame:expandTemplate{ title = "Tooltip", args = { pic, entity.name, entity.desc, stats }}
     end else
     end else
Строка 70: Строка 70:
     -- {{Tooltip|Текст|[[картиночка|64x64px|left|middle|link=]] Название|Описание}}
     -- {{Tooltip|Текст|[[картиночка|64x64px|left|middle|link=]] Название|Описание}}
     end else
     end else
       out = frame:expandTemplate{ title = "Tooltip", args = { frame.args[1],  "[[Файл:Mousegif.gif|64x64px|left|middle|link=]] Не найден", "Предмет не найден"}}
       out = frame:expandTemplate{ title = "Tooltip", args = { pic,  "[[Файл:Mousegif.gif|64x64px|left|middle|link=]] Не найден", "Предмет не найден"}}
     end
     end
     return out
     return out