Модуль:TableOfChemicals: различия между версиями

Нет описания правки
Нет описания правки
Строка 158: Строка 158:
function getEffects(chemPrototypeId)
function getEffects(chemPrototypeId)
local descriptions = {}
local effectsTable = "{|"
local chemPrototype = p.chem[chemPrototypeId]
local chemPrototype = p.chem[chemPrototypeId]
Строка 168: Строка 168:
for _, effect in pairs(metabolismGroup) do
for _, effect in pairs(metabolismGroup) do
if effect.description ~= "" then
if effect.description ~= "" then
table.insert(descriptions, "* "..effect.description)
effectsTable = attachAsNewLine(effectsTable, "|-")
effectsTable = attachAsNewLine(effectsTable, "|"..effect.description)
end
end
end
end
end
end
return "\n"..table.concat(descriptions, "\n")
effectsTable = attachAsNewLine(effectsTable, "|}")
return effectsTable
    
    
end
end