Module:Sandbox

From The Deadlock Wiki
Revision as of 19:57, 21 April 2025 by Monster Domosed (talk | contribs) (test)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Sandbox/doc

local function get_all_item_names()
    local items = {}
    
    for item_key, item_data in pairs(items_data) do
        if item_data["Name"] ~= nil and item_data["IsDisabled"] == false then
            local lang_code = lang_module.get_lang_code()
            local item_name_local = lang_module.get_string(item_key, lang_code)
            
            if item_name_local and item_name_local ~= "" then
                table.insert(items, item_name_local)
            end
        end
    end
    
    -- Сортируем имена предметов по алфавиту
    table.sort(items)
    
    -- Объединяем через запятую
    return table.concat(items, ", ")
end