Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 79: | Строка 79: | ||
local weight = child.weight or "default" | local weight = child.weight or "default" | ||
groupSelectors[weight] = groupSelectors[weight] or {} | groupSelectors[weight] = groupSelectors[weight] or {} | ||
table.insert(groupSelectors[weight], child. | for _, subChild in ipairs(child.children) do | ||
table.insert(groupSelectors[weight], subChild) | |||
end | |||
elseif child.id then | |||
-- Если это просто элемент с id | |||
result = result .. formatContent(child) | |||
end | end | ||
end | end | ||
| Строка 86: | Строка 91: | ||
for weight, groups in pairs(groupSelectors) do | for weight, groups in pairs(groupSelectors) do | ||
result = result .. string.format('<div class="together" id="%s">', weight) | result = result .. string.format('<div class="together" id="%s">', weight) | ||
result = result .. getContentsOutput(groups) | |||
result = result .. '</div>' | result = result .. '</div>' | ||
end | end | ||