Модуль:Песочница/Pok: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 124: | Строка 124: | ||
}) | }) | ||
elseif recipe and recipe.resultReagents then | elseif recipe and recipe.resultReagents then | ||
for reagent, amount in pairs(recipe.resultReagents) do | |||
local reagentName = chemMapping[reagent] or reagent | |||
table.insert(recipes, { | |||
result = reagentName .. "|amount=" .. amount .. "ед.|mode-chem=1", | |||
completetime = recipe.completetime, | |||
materials = recipe.materials, | |||
discipline = "Static", | |||
tier = 0 | |||
}) | |||
break | |||
end | |||
else | else | ||
out = out .. '<div style="color:red;">Ошибка: Рецепт с ID "' .. recipeId .. '" не найден или поля result/resultReagents отсутствуют.</div>' | out = out .. '<div style="color:red;">Ошибка: Рецепт с ID "' .. recipeId .. '" не найден или поля result/resultReagents отсутствуют.</div>' | ||