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