Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
local p = {}
local p = {}
function p.getName(frame)
function p.getName(frame)
     local id = tonumber(frame.args[1])
     local id = tonumber(frame.args[1])
Zeile 10: Zeile 11:
     end
     end
end
end
return p
return p

Version vom 27. Dezember 2025, 19:36 Uhr

local p = {}

function p.getName(frame)

   local id = tonumber(frame.args[1])
   if not id then return "ID fehlt" end
   local data = mw.loadData('Modul:ItemData')
   if data and data[id] then
       return data[id].identifiedDisplayName or ("Item " .. id)
   else
       return "Item " .. id
   end

end

return p