Anonymous

Module:Constants: Difference between revisions

From Melvor Idle
Added p.getModifierSkills
(Fixed True -> true)
(Added p.getModifierSkills)
Line 290: Line 290:


   return p._getModifierText(modifier, value, doColor)
   return p._getModifierText(modifier, value, doColor)
end
function p.getModifierSkills(modifiers)
  local skillArray = {}
  for modifier, value in Shared.skpairs(modifiers) do
    if type(value) == 'table' then
      for i, subVal in Shared.skpairs(value) do
        local skillName = p.getSkillName(subVal[1])
        if not Shared.contains(skillArray, skillName) then
          table.insert(skillArray, skillName)
        end
      end
    end
  end
  return skillArray
end
end


return p
return p