Модуль:Prototypes/Машина/Станок: различия между версиями

мНет описания правки
мНет описания правки
Строка 208: Строка 208:
-- Вывод рецептов
-- Вывод рецептов
for _, recipe in ipairs(recipes) do
for _, recipe in ipairs(recipes) do
    output = output .. '{{Шаблон:Prototypes/Машина/Станок|product=' .. recipe.result .. '}}'
    output = output .. '{{Шаблон:Prototypes/Машина/Станок|product=' .. recipe.result
    output = output .. '{{Шаблон:Prototypes/Машина/Станок|complete-time=' .. format_seconds_to_short_string(recipe.completetime) .. '}}'
    output = output .. '|complete-time=' .. format_seconds_to_short_string(recipe.completetime)
    output = output .. '{{Шаблон:Prototypes/Машина/Станок|materials='
    output = output .. '|materials='
    for material, amount in pairs(recipe.materials) do
    for material, amount in pairs(recipe.materials) do
        output = output .. '<li>' .. material .. ': ' .. amount .. '</li>'
        output = output .. '<li>' .. material .. ': ' .. amount .. '</li>'
    end
    end
    output = output .. '}}'
 
   
    -- Информация об исследовании
    -- Информация об исследовании
    if recipe.discipline ~= "Static" and recipe.discipline ~= "Unknown" then
    if recipe.discipline ~= "Static" and recipe.discipline ~= "Unknown" then
        output = output .. '{{Шаблон:Prototypes/Машина/Станок|info=Исследование: ' .. recipe.discipline .. ' - ' .. recipe.researchName
        output = output .. '|info=Исследование: ' .. recipe.discipline .. ' - ' .. recipe.researchName
        output = output .. ' (Уровень: ' .. recipe.tier .. ')}}'
        output = output .. ' (Уровень: ' .. recipe.tier .. ')'
    end
    end
     
     
Строка 227: Строка 226:
    end
    end
end
end
utput = output .. '}}'


     return mw.getCurrentFrame():preprocess(output)
     return mw.getCurrentFrame():preprocess(output)