Module:ItemIDList

local tr = require('Module:Tr') local getData = require('Module:Iteminfo').getItemStat local info = require('Module:Iteminfo').info

local na local na_image local lang

local l10n_info = { ['en'] = { ['na_note'] = 'No official name', ['id'] = 'ID', ['name'] = 'Name', ['iname'] = 'Internal name', ['ename'] = 'English name', ['image'] = 'Image' }, }

local l10n_table

local function l10n(key) return l10n_table[key] or l10n_info['en'][key] or '' end

local replaceName = { [115] = "Shadow Orb (item)", [669] = "Fish (item)", [989] = 'Enchanted Sword (item)', [1435] = "The Destroyer (item)", [1475] = "Darkness (Painting)", [2436] = "Jellyfish (bait)", [2437] = "Jellyfish (bait)", [2438] = "Jellyfish (bait)", [3062] = "Crimson Heart (item)", [4633] = "Oasis (Painting)", [4725] = "Graveyard (Painting)", }

local imageName = { [115] = "Shadow Orb (item)", [989] = 'Enchanted Sword (item)', [1435] = "The Destroyer (item)", [1475] = "Darkness (Painting)", [2436] = 'Blue Jellyfish (bait)', [2437] = 'Green Jellyfish (bait)', [2438] = 'Pink Jellyfish (bait)', [3315] = 'Format C', [3062] = "Crimson Heart (item)", [4484] = '1 2 Second Timer', [4485] = '1 4 Second Timer', [4725] = "Graveyard (Painting)", [5308] = 'R Terraria', [5336] = 'Advanced Combat Techniques Volume Two', }

local function row(id) local result = ' ' .. id .. ' '	local name = getData(id, 'name') local internalName = getData(id, 'internalName') if name == '' then result = result .. ' ' .. na_image .. ' ' .. na .. ' ' .. (lang ~= 'en' and ' ' .. na .. ' ' or '') else linkName = replaceName[id] or name image = imageName[id] or name if lang == 'en' then result = result .. '  ' .. name .. ' ' else result = result .. '  ' .. tr.translate(name, lang) .. ' ' .. ' ' .. name .. ' '		end end result = result .. '  '	return result end

return { main = function(frame) lang = frame:expandTemplate{ title = 'lang' } l10n_table = l10n_info[lang] or l10n_info['en'] na_image = frame:expandTemplate{ title = 'na' } na = na_image .. ' ' .. frame:expandTemplate{ title = 'note', args = { small = 'y', paren = 'y', l10n('na_note') }} local result = { ' ' return table.concat(result, '\n') end, }