Anonymous

Module:Prayer: Difference between revisions

From Melvor Idle
Added getPrayerCategories
(Fixed a thing)
(Added getPrayerCategories)
Line 132: Line 132:


   return p._getPrayerStat(prayer, statName)
   return p._getPrayerStat(prayer, statName)
end
function p._getPrayerCategories(prayer)
  return '[[Category:Prayers]]'
end
function p.getPrayerCategories(frame)
  local prayerName = frame.args ~= nil and frame.args[1] or frame[1]
  local prayer = p.getPrayer(prayerName)
  if prayer == nil then
    return "ERROR: Could not find a prayer named "..prayerName
  end
  return p._getPrayerCategories(prayer)
end
end


return p
return p