Module:Pets: Difference between revisions

34 bytes removed ,  12 November 2021
Moved to referencing getSkillID in Constants
(Substitute links with Icons.Icon() where possible to benefit from ambiguous link handling)
(Moved to referencing getSkillID in Constants)
Line 8: Line 8:
local Constants = require('Module:Constants')
local Constants = require('Module:Constants')
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')
local Skills = require('Module:Skills')
local CombatAreas = require('Module:CombatAreas')
local CombatAreas = require('Module:CombatAreas')


Line 73: Line 72:
   -- Determine icon type (if any)
   -- Determine icon type (if any)
   local iconType = nil
   local iconType = nil
   if Skills.getSkillID(petSource) ~= nil then
   if Constants.getSkillID(petSource) ~= nil then
     iconType = 'skill'
     iconType = 'skill'
   else
   else
Line 141: Line 140:
function p.getPetTableBySkill(frame)
function p.getPetTableBySkill(frame)
   local skillName = frame.args ~= nil and frame.args[1] or frame
   local skillName = frame.args ~= nil and frame.args[1] or frame
   local skillID = Skills.getSkillID(skillName)
   local skillID = Constants.getSkillID(skillName)


   if skillID == nil then
   if skillID == nil then