4,951
edits
ByteFoolish (talk | contribs) (getPetNavbox) |
Falterfire (talk | contribs) (Separated Pet navbox into Skill Pets and Other Pets (with plans to add a Boss Pets section when v0.19.0 drops)) |
||
Line 150: | Line 150: | ||
--• | --• | ||
local result = '{| class="wikitable" style="margin:auto; text-align:center; clear:both; width: 100%"' | local result = '{| class="wikitable" style="margin:auto; text-align:center; clear:both; width: 100%"' | ||
result = result..'\r\n|-\r\n!Pets | result = result..'\r\n|-\r\n!colspan="2"|[[Pets]]' | ||
local | local skillPetList = {} | ||
local otherPetList = {} | |||
for i, petData in Shared.skpairs(PetData.Pets) do | for i, petData in Shared.skpairs(PetData.Pets) do | ||
table.insert( | if petData.skill ~= nil and petData.skill >= 0 and petData.name ~= "Ty" then | ||
table.insert(skillPetList, Icons.Icon({petData.name, type='pet'})) | |||
else | |||
table.insert(otherPetList, Icons.Icon({petData.name, type='pet'})) | |||
end | |||
end | end | ||
result = result..'|'..table.concat( | result = result..'\r\n|-\r\n!Skill Pets\r\n|'..table.concat(skillPetList, ' • ') | ||
result = result..'\r\n|-\r\n!Other Pets\r\n|'..table.concat(otherPetList, ' • ') | |||
result = result..'\r\n|}' | result = result..'\r\n|}' | ||
return result | return result |