Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 80: | Строка 80: | ||
local result = '' | local result = '' | ||
if item.StorageFill and item.StorageFill.contents then | if item.StorageFill and item.StorageFill.contents then | ||
result = result .. getContentsOutput(item.StorageFill.contents) | result = result .. getContentsOutput(item.StorageFill.contents) | ||
elseif item.EntityTableContainerFill and item.EntityTableContainerFill.containers then | elseif item.EntityTableContainerFill and item.EntityTableContainerFill.containers then | ||
local containers = item.EntityTableContainerFill.containers | local containers = item.EntityTableContainerFill.containers | ||
if containers.entity_storage then | if containers.entity_storage then | ||
for _, child in ipairs(containers.entity_storage.children) do | local tableId = containers.entity_storage.tableId | ||
if tableId then | |||
result = result .. getTableOutput(tableId) | |||
else | |||
for _, child in ipairs(containers.entity_storage.children) do | |||
if child.id then | |||
result = result .. formatContent(child) | |||
elseif child["!type"] == "GroupSelector" then | |||
result = result .. '<div class="together">' | |||
result = result .. getContentsOutput(child.children) | |||
result = result .. '</div>' | |||
end | |||
end | end | ||
end | end | ||
| Строка 109: | Строка 104: | ||
return result | return result | ||
end | end | ||
-- Формирование списка химии | -- Формирование списка химии | ||