Module:ItemData: Difference between revisions

Jump to navigation Jump to search
Shatangmi (talk | contribs)
No edit summary
added function to get component name
Line 70: Line 70:
return item[property]
return item[property]
end
p.get_component_name = function(frame)
local item_name = frame.args[1]
local item = get_json_item(item_name)
if(item == nil) then return "Item Not Found" end
local components = item['Components']
if(item == nil) then return "Components Not Found" end
local component = get_json_item(components[1])
return component['Name']
end
end


return p
return p