Anonymous

Module:Navboxes: Difference between revisions

From Melvor Idle
Move expansion icon to prayer category instead of each prayer
(Abyssal runes and prayers)
(Move expansion icon to prayer category instead of each prayer)
Line 263: Line 263:
local prayerList = {
local prayerList = {
["Prayers"] = Prayer.getPrayers(function(prayer) return prayer.isUnholy == nil and prayer.isAbyssal == nil end),
["Prayers"] = Prayer.getPrayers(function(prayer) return prayer.isUnholy == nil and prayer.isAbyssal == nil end),
["Unholy Prayers"] = Prayer.getPrayers(function(prayer) return prayer.isUnholy end),
["{{AoD}} Unholy Prayers"] = Prayer.getPrayers(function(prayer) return prayer.isUnholy end),
["Abyssal Prayers"] = Prayer.getPrayers(function(prayer) return prayer.isAbyssal end)
["{{ItA}} Abyssal Prayers"] = Prayer.getPrayers(function(prayer) return prayer.isAbyssal end)
}
}


Line 281: Line 281:
table.insert(resultPart, '\r\n|-\r\n!style="text-align:center;"| ' .. catName)
table.insert(resultPart, '\r\n|-\r\n!style="text-align:center;"| ' .. catName)
for i, prayer in ipairs(subList) do
for i, prayer in ipairs(subList) do
table.insert(prayerText, Icons.Icon({prayer.name, type='prayer', expicon = Icons.getExpansionIcon(prayer.id)}))
-- Only show expansion in the prayer subtable
expicon = (catName == "Prayers") and Icons.getExpansionIcon(prayer.id)
table.insert(prayerText, Icons.Icon({prayer.name, type='prayer', expicon = expicon}))
end
end
table.insert(resultPart, '\r\n|style="text-align:center;"| ' .. table.concat(prayerText, ' • '))
table.insert(resultPart, '\r\n|style="text-align:center;"| ' .. table.concat(prayerText, ' • '))
239

edits