Модуль:Песочница/Pok: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 113: | Строка 113: | ||
local matchingStorages = {} | local matchingStorages = {} | ||
for storageId, storage in pairs(itemData) do | |||
if type(storage) == "table" then | |||
local found = false | |||
if storage.EntityTableContainerFill | |||
and storage.EntityTableContainerFill.containers | |||
and #allRelatedTables > 0 then | |||
if searchTableIdInStructure(storage.EntityTableContainerFill.containers, allRelatedTables) then | |||
found = true | |||
end | |||
end | |||
if searchItemInStructure(storage, targetId) then | |||
found = true | |||
end | |||
if found then | |||
local actualId = storage.id or storageId | |||
table.insert(matchingStorages, actualId) | |||
end | |||
end | |||
end | |||
if #matchingStorages == 0 then | if #matchingStorages == 0 then | ||