Editing Module:Item NavboxGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 76: | Line 76: | ||
table.sort(items) | table.sort(items) | ||
end | |||
end | |||
-- Gets list of item codenames | -- Gets list of item codenames | ||
local function get_item_codenames(slot, min_souls, max_souls, filter_mode | local function get_item_codenames(slot, min_souls, max_souls, filter_mode) | ||
if slot ~= 'Weapon' and slot ~= 'Armor' and slot ~= 'Tech' then return '' end | if slot ~= 'Weapon' and slot ~= 'Armor' and slot ~= 'Tech' then return '' end | ||
local lang_code = lang_module.get_lang_code() | local lang_code = lang_module.get_lang_code() | ||
local items = {} | local items = {} | ||
local slot_items = get_items_by_slot(slot) | local slot_items = get_items_by_slot(slot) | ||
| Line 116: | Line 104: | ||
local item_name_english = lang_module.get_string(item_key, "en") | local item_name_english = lang_module.get_string(item_key, "en") | ||
local item_name_local = lang_module.get_string(item_key, lang_code) | local item_name_local = lang_module.get_string(item_key, lang_code) | ||
local item_codename = items_module.get_codename(item_key, item_name_english) | |||
local item_codename = items_module.get_codename( | |||
local item_template | local item_template | ||
if lang_code == "en" then | if lang_code == "en" then | ||
item_template = "{{ItemIcon| | item_template = "{{ItemIcon|" .. item_codename .. "|size=26px}}" | ||
else | else | ||
item_template = "{{ItemIcon|" .. item_name_english .. "|lang=" .. lang_code .. "|l1=" .. item_name_local .. "|size=26px}}" | item_template = "{{ItemIcon|" .. item_name_english .. "|lang=" .. lang_code .. "|l1=" .. item_name_local .. "|size=26px}}" | ||