Module:Sandbox: Difference between revisionsGive feedback
Jump to navigation
Jump to search
cleared Tags: Blanking Manual revert |
test |
||
| Line 1: | Line 1: | ||
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 | |||