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

мНет описания правки
мНет описания правки
Строка 120: Строка 120:


     -- Обработка staticRecipes
     -- Обработка staticRecipes
    if lathe.Lathe.staticRecipes then
if lathe.Lathe.staticRecipes then
        for _, recipeId in ipairs(lathe.Lathe.staticRecipes) do
    for _, recipeId in ipairs(lathe.Lathe.staticRecipes) do
            local recipe = getRecipeDetails(recipeId)
        local recipe = getRecipeDetails(recipeId)
            if recipe then
        if recipe and recipe.result then
                table.insert(recipes, {
            table.insert(recipes, {
                    result = recipe.result,
                result = recipe.result,
                    completetime = recipe.completetime,
                completetime = recipe.completetime,
                    materials = recipe.materials,
                materials = recipe.materials,
                    discipline = "Static",
                discipline = "Static",
                    tier = 0
                tier = 0
                })
            })
            end
        else
        end
            output = output .. '<div style="color:red;">Ошибка: Рецепт с ID "' .. recipeId .. '" не найден или поле result отсутствует.</div>'
    end
        end
    end
end


     -- Обработка dynamicRecipes
     -- Обработка dynamicRecipes