Модуль:Prototypes/Хранилище/Предмет: различия между версиями

мНет описания правки
мНет описания правки
Строка 69: Строка 69:
     if not children then return 'Таблица не содержит элементов.' end
     if not children then return 'Таблица не содержит элементов.' end


     local result = ''
     return processNestedSelectors(children)
    for _, child in ipairs(children) do
        result = result .. formatContent(child)
    end
    return result
end
end


Строка 97: Строка 93:
     end
     end


    return result
end
-- Обработка вложенных таблиц
local function processNestedSelectors(children)
    local result = ''
    for _, child in ipairs(children) do
        if child.id then
            result = result .. formatContent(child)
        elseif child["!type"] == "NestedSelector" and child.tableId then
            result = result .. getTableOutput(child.tableId)
        end
    end
     return result
     return result
end
end