Anonymous

Module:Pets: Difference between revisions

From Melvor Idle
Fixing Ty showing up as the woodcutting pet
(getPetSidebar: Add completion indicator & formatting for consistency with {{ItemBox}})
(Fixing Ty showing up as the woodcutting pet)
Line 41: Line 41:
   local skillID = Skills.getSkillID(skillName)
   local skillID = Skills.getSkillID(skillName)
   for i, pet in pairs(PetData.Pets) do
   for i, pet in pairs(PetData.Pets) do
     if(skillID == pet.skill) then
    --Deliberately excluding Ty. He knows what he did.
     if(skillID == pet.skill and pet.name ~= 'Ty') then
       result = Shared.clone(pet)
       result = Shared.clone(pet)
       --Make sure every pet has an id, and account for Lua being 1-index
       --Make sure every pet has an id, and account for Lua being 1-index