Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 30: | Строка 30: | ||
for _, solution in pairs(solutions) do | for _, solution in pairs(solutions) do | ||
for _, reagent in ipairs(solution.reagents) do | for _, reagent in ipairs(solution.reagents) do | ||
result = result .. string.format('<li>[[Химия#chem_%s|%s] (%d ед.)</li>', reagent.ReagentId, reagent.ReagentId, reagent.Quantity) | result = result .. string.format('<li>[[Химия#chem_%s|%s]] (%d ед.)</li>', reagent.ReagentId, reagent.ReagentId, reagent.Quantity) | ||
end | end | ||
end | end | ||
result = result .. '</ul>' | result = result .. '</ul>' | ||
return result | return mw.getCurrentFrame():preprocess(result) | ||
end | end | ||
| Строка 49: | Строка 49: | ||
if contents then | if contents then | ||
for _, content in ipairs(contents) do | for _, content in ipairs(contents) do | ||
result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}}}', content.id, content.id) | |||
end | end | ||
elseif tableContainer then | elseif tableContainer then | ||
| Строка 64: | Строка 60: | ||
if children then | if children then | ||
for _, child in ipairs(children) do | for _, child in ipairs(children) do | ||
result = result .. string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s.png|name={{#invoke:Entity Lookup|getname|%s}}}}', child.id, child.id) | |||
end | end | ||
else | else | ||