Module:Items: Difference between revisions

Created a currently empty p.getItemCategories function
(Add getItemUses)
(Created a currently empty p.getItemCategories function)
Line 1,117: Line 1,117:
   result = result..'\r\n|}'
   result = result..'\r\n|}'
   return result
   return result
end
function p._getItemCategories(item)
  local result = ''
  return result
end
function p.getItemCategories(frame)
  local itemName = frame.args ~= nil and frame.args[1] or frame
  local item = p.getItem(itemName)
  if item == nil then
    return "ERROR: No item named "..itemName.." exists in the data module"
  end
  return p._getItemCategories(item)
end
end


return p
return p