Модуль:Песочница/Pok: различия между версиями

Нет описания правки
мНет описания правки
Строка 85: Строка 85:
out = out .. '</div>'
out = out .. '</div>'


-- Блок необходимых исследований
if tech.recipeUnlocks and #tech.recipeUnlocks > 0 then
if tech.recipeUnlocks and #tech.recipeUnlocks > 0 then
    out = out .. '<div class="research__technologies-unlocks">Разблокирует:'
    out = out .. '<div class="research__technologies-unlocks">Разблокирует:'
Строка 91: Строка 90:
    for _, recipe in ipairs(tech.recipeUnlocks) do
    for _, recipe in ipairs(tech.recipeUnlocks) do
        -- Проверяем, что recipe не пустой и валидный
        if recipe and recipe ~= "" then  
        if recipe and recipe ~= "" then
            out = out .. frame:preprocess('<li>{{#invoke:Entity Lookup|createimagetooltip|Файл:'  
            out = out .. frame:preprocess('<li>{{#invoke:Entity Lookup|createimagetooltip|Файл:'  
                .. recipe .. '.png|' .. recipe  
                .. recipe .. '.png|' .. recipe  
                .. '|Мета=32x32px,link=}} {{#invoke:Entity Lookup|getname|'  
                .. '|Мета=32x32px,link=}} {{#invoke:Entity Lookup|getname|'  
                .. recipe .. '}}</li>')
                .. recipe .. '}}</li>')
        else
            out = out .. '<li style="color:red;">Ошибка: некорректный рецепт.</li>'
        end
        end
    end
    end
Строка 105: Строка 101:
    out = out .. '</div>'
    out = out .. '</div>'
end
end
out = out .. '</div>'
out = out .. '</div>'