Модуль:Песочница/Pok: различия между версиями

мНет описания правки
мНет описания правки
Строка 113: Строка 113:


     local matchingStorages = {}
     local matchingStorages = {}
    for storageId, storage in pairs(itemData) do
for storageId, storage in pairs(itemData) do
        if type(storage) == "table" then
    if type(storage) == "table" then
            local found = false
        local found = false
 
            if storage.EntityTableContainerFill and storage.EntityTableContainerFill.containers and #allRelatedTables > 0 then
        if storage.EntityTableContainerFill  
                if searchTableIdInStructure(storage.EntityTableContainerFill.containers, allRelatedTables) then
            and storage.EntityTableContainerFill.containers  
                    found = true
            and #allRelatedTables > 0 then
                end
            if searchTableIdInStructure(storage.EntityTableContainerFill.containers, allRelatedTables) then
            end
                found = true
 
            end
            if searchItemInStructure(storage, targetId) then
        end
                found = true
            end
        if searchItemInStructure(storage, targetId) then
 
            found = true
            if found then
        end
                table.insert(matchingStorages, storageId)
            end
        if found then
        end
            local actualId = storage.id or storageId
    end
            table.insert(matchingStorages, actualId)
        end
    end
end


     if #matchingStorages == 0 then
     if #matchingStorages == 0 then