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

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