Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 4: Zeile 4:
     local id = tonumber(frame.args[1])
     local id = tonumber(frame.args[1])
     if not id then return "ID fehlt" end
     if not id then return "ID fehlt" end
    -- Lädt die Daten aus Modul:ItemData
     local data = mw.loadData('Modul:ItemData')
     local data = mw.loadData('Modul:ItemData')
     if data and data[id] then
     if data and data[id] then
         return data[id].identifiedDisplayName or ("Item " .. id)
         return data[id].identifiedDisplayName or ("Item " .. id)

Version vom 27. Dezember 2025, 19:47 Uhr

local p = {}

function p.getName(frame)

   local id = tonumber(frame.args[1])
   if not id then return "ID fehlt" end
   -- Lädt die Daten aus Modul:ItemData
   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