Модуль:tableofchemicals
| Строка 43: | Строка 43: | ||
templateArgs.actions = getActions(reactPrototype) | templateArgs.actions = getActions(reactPrototype) | ||
-- Определяем первое вещество из products для отображения в колонке "Вещество" | |||
local firstProductId = nil | |||
for productId, _ in pairs(reactPrototype.products) do | |||
firstProductId = productId | |||
break | |||
end | |||
local substanceName = "" | |||
if firstProductId and p.chem[firstProductId] then | |||
substanceName = p.chem[firstProductId].name or firstProductId | |||
end | |||
templateArgs.substance = substanceName | |||
local template = "Строка_реакции" | local template = "Строка_реакции" | ||