17,101
edits
(Remove reference to redundant data module) |
(Add TotH icon to tables) |
||
Line 18: | Line 18: | ||
function p.getPrayers(checkFunc) | function p.getPrayers(checkFunc) | ||
return GameData.getEntities('prayers', checkFunc) | return GameData.getEntities('prayers', checkFunc) | ||
end | |||
--Returns the expansion icon for the prayer if it has one | |||
function p.getExpansionIcon(frame) | |||
local prayerName = frame.args ~= nil and frame.args[1] or frame | |||
local prayer = p.getPrayer(prayerName) | |||
if prayer == nil then | |||
return "ERROR: No prayer named " .. prayerName .. " exists in the data module[[Category:Pages with script errors]]" | |||
end | |||
return Icons.getExpansionIcon(prayer.id) | |||
end | end | ||
Line 122: | Line 133: | ||
local result = '{| class="wikitable sortable stickyHeader"' | local result = '{| class="wikitable sortable stickyHeader"' | ||
result = result..'\r\n|-class=headerRow-0' | result = result..'\r\n|-class=headerRow-0' | ||
result = result..'\r\n!colspan="2"|Prayer!!'..Icons.Icon({"Prayer", type="skill", notext=true})..' | result = result..'\r\n!colspan="2"|Prayer!!'..Icons.Icon({"Prayer", type="skill", notext=true})..' Level' | ||
result = result..'!!Effects!!Point Cost' | result = result..'!!Effects!!Point Cost' | ||
Line 137: | Line 148: | ||
result = result..'\r\n|-' | result = result..'\r\n|-' | ||
result = result..'\r\n|'..Icons.Icon({prayer.name, type='prayer', notext=true, size='50'}) | result = result..'\r\n|'..Icons.Icon({prayer.name, type='prayer', notext=true, size='50'}) | ||
result = result..'||'..Icons.Icon({prayer.name, type='prayer', noicon=true})..'||'..prayer.level | result = result..'||' .. Icons.getExpansionIcon(prayer.id) .. Icons.Icon({prayer.name, type='prayer', noicon=true}) | ||
result = result..'||style="text-align:right;"| '..prayer.level | |||
result = result..'||'..p._getPrayerEffect(prayer) | result = result..'||'..p._getPrayerEffect(prayer) | ||
result = result..'||'..p.getPrayerCost(prayer) | result = result..'||'..p.getPrayerCost(prayer) | ||
Line 156: | Line 168: | ||
result = result..'\r\n|-' | result = result..'\r\n|-' | ||
result = result..'\r\n|'..Icons.Icon({item.name, type='item', notext=true, size='50'}) | result = result..'\r\n|'..Icons.Icon({item.name, type='item', notext=true, size='50'}) | ||
result = result..'||'..Icons.Icon({item.name, type='item', noicon=true}) | result = result..'||' .. Icons.getExpansionIcon(item.id) .. Icons.Icon({item.name, type='item', noicon=true}) | ||
result = result..'||style="text-align:right;"|'..Shared.formatnum(item.prayerPoints) | result = result..'||style="text-align:right;"|'..Shared.formatnum(item.prayerPoints) | ||
result = result..'||'..ItemSources._getItemSources(item, false, false) | result = result..'||'..ItemSources._getItemSources(item, false, false) |