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

мНет описания правки
мНет описания правки
Строка 56: Строка 56:
         return nil
         return nil
     end
     end
    local path = "Resources/Textures/" .. entry.Sprite.sprite


     if param == "image" then
     if param == "image" then
Строка 65: Строка 67:
     return nil
     return nil
end
end


-- Генерация шаблона по умолчанию
-- Генерация шаблона по умолчанию
Строка 72: Строка 75:
     local servers = params.Servers or ""
     local servers = params.Servers or ""
     local source = params.Source or ""
     local source = params.Source or ""
     local path = params.Path  
     local path = params.Path
     local tags = params.Tags or ""
     local tags = params.Tags or ""
     local licensing = params.Licensing or "CC-BY-SA-3.0"
     local licensing = params.Licensing or "CC-BY-SA-3.0"


    if not entry.id or not entry.Sprite or not entry.Sprite.sprite then
     -- Формирование шаблона
        return nil
    end
 
    if not path or path == "" then
        path = "Resources/Textures/" .. entry.Sprite.sprite
    end
 
     -- Формирование шаблон
     return mw.getCurrentFrame():preprocess(
     return mw.getCurrentFrame():preprocess(
         "\n== Краткое описание ==\n" ..
         "\n== Краткое описание ==\n" ..