17,101
edits
No edit summary |
(Update for v1.0.3) |
||
Line 46: | Line 46: | ||
end | end | ||
return result | return result | ||
end | |||
function p._getObstacleRequirements(obstacle) | |||
local resultPart = {} | |||
if obstacle.category == nil then | |||
-- Pillar | |||
table.insert(resultPart, Icons._SkillReq('Agility', 99)) | |||
elseif obstacle.category > 0 then | |||
-- Obstacle | |||
table.insert(resultPart, Icons._SkillReq('Agility', obstacle.category * 10)) | |||
end | |||
if type(obstacle.skillRequirements) == 'table' then | |||
for i, skillReq in ipairs(obstacle.skillRequirements) do | |||
local skillName = Constants.getSkillName(skillReq.skill) | |||
if skillName ~= nil then | |||
table.insert(resultPart, Icons._SkillReq(skillName, skillReq.level)) | |||
end | |||
end | |||
end | |||
return table.concat(resultPart, '<br/>') | |||
end | end | ||
Line 100: | Line 120: | ||
--Grabbing requirements to create | --Grabbing requirements to create | ||
result = result..'||' | result = result..'|| ' .. p._getObstacleRequirements(obst) | ||
--Finally, the cost | --Finally, the cost |