Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 50: | Строка 50: | ||
end | end | ||
-- Обработка вложенных | -- Обработка вложенных таблиц | ||
processNestedSelectors = function(children) | processNestedSelectors = function(children) | ||
local result = '' | local result = '' | ||
for _, child in ipairs(children) do | for _, child in ipairs(children) do | ||
if child.id then | if child.id then | ||
result = result .. formatContent(child) | result = result .. formatContent(child) | ||
elseif child["!type"] == "NestedSelector" and child.tableId then | elseif child["!type"] == "NestedSelector" and child.tableId then | ||
result = result .. getTableOutput(child.tableId) | result = result .. getTableOutput(child.tableId) | ||
end | end | ||
end | end | ||
return result | return result | ||
end | end | ||
| Строка 94: | Строка 80: | ||
local result = '' | local result = '' | ||
-- Обработка StorageFill внутри контейнеров | |||
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) | ||
| Строка 106: | Строка 93: | ||
else | else | ||
result = result .. 'Таблица не найдена.' | result = result .. 'Таблица не найдена.' | ||
end | |||
-- Обработка GroupSelector внутри контейнеров | |||
if containers.entity_storage then | |||
for _, child in ipairs(containers.entity_storage.children) do | |||
if child["!type"] == "GroupSelector" then | |||
result = result .. '<div class="test">' | |||
result = result .. getContentsOutput(child.children) | |||
result = result .. '</div>' | |||
end | |||
end | |||
end | end | ||
end | end | ||