444
edits
Inconvenient (talk | contribs) m (Undo revision 44798 by Inconvenient (talk)) Tag: Undo |
Inconvenient (talk | contribs) (moved getPotionNavbox here from Module:Skills) |
||
Line 32: | Line 32: | ||
result = result..'\r\n|-\r\n!scope="row"|Special' | result = result..'\r\n|-\r\n!scope="row"|Special' | ||
result = result..'\r\n|style="text-align:center;|'..table.concat(special, ' • ') | result = result..'\r\n|style="text-align:center;|'..table.concat(special, ' • ') | ||
result = result..'\r\n|}' | |||
return result | |||
end | |||
function p.getPotionNavbox(frame) | |||
local result = '{| class="wikitable" style="margin:auto; clear:both; width: 100%"' | |||
result = result..'\r\n!colspan=2|'..Icons.Icon({'Herblore', 'Potions', type='skill'}) | |||
local CombatPots = {} | |||
local SkillPots = {} | |||
for i, potData in Shared.skpairs(SkillData.Herblore.ItemData) do | |||
if potData.category == 0 then | |||
table.insert(CombatPots, Icons.Icon({potData.name, type='item', img=(potData.name..' I')})) | |||
else | |||
if potData.name == 'Bird Nests Potion' then | |||
table.insert(SkillPots, Icons.Icon({"Bird Nest Potion", type='item', img="Bird Nest Potion I"})) | |||
else | |||
table.insert(SkillPots, Icons.Icon({potData.name, type='item', img=(potData.name..' I')})) | |||
end | |||
end | |||
end | |||
result = result..'\r\n|-\r\n!Combat Potions\r\n|class="center" style="vertical-align:middle;"' | |||
result = result..'|'..table.concat(CombatPots, ' • ') | |||
result = result..'\r\n|-\r\n!Skill Potions\r\n|class="center" style="vertical-align:middle;"' | |||
result = result..'|'..table.concat(SkillPots, ' • ') | |||
result = result..'\r\n|}' | result = result..'\r\n|}' | ||
return result | return result |
edits