Anonymous

Module:Pets: Difference between revisions

From Melvor Idle
62 bytes removed ,  14 January 2021
getPetSidebar Optional args
No edit summary
(getPetSidebar Optional args)
Line 77: Line 77:
   local args = frame.args ~= nil and frame.args or frame
   local args = frame.args ~= nil and frame.args or frame
   local result = nil
   local result = nil
   local name = args.name ~= nil and args.name or args[1]
   local name = (args.name ~= nil and args.name ~= '') and args.name or args[1]
   local pet = p.getPet(name)
   local pet = p.getPet(name)
  --local skill = args.skill ~= nil and args.skill or '{{Skill|'..Skills.getSkillName(pet.skill)..'}}'
   local skill = (args.skill ~= nil and args.skill ~= '') and args.skill or Icons.Icon({Skills.getSkillName(pet.skill), type='skill'})
   local skill = (args.skill ~= nil and args.skill ~= '') and args.skill or Icons.Icon({Skills.getSkillName(pet.skill), type='skill'})
   local effect = args.effect ~= nil and args.effect or pet.description
   local effect = (args.effect ~= nil and args.effect ~= '') and args.effect or pet.description
    
    
   result = '{| class="wikitable" style="float:right; clear:right;"\r\n|-\r\n'
   result = '{| class="wikitable" style="float:right; clear:right;"\r\n|-\r\n'
285

edits