Module:Skills/Agility: Difference between revisions

no edit summary
(Add public functions to grab obstacle requirements and costs)
No edit summary
Line 70: Line 70:
end
end


function p._getObstacleRequirements(obstacle)
local function formatObstacleRequirements(obstacle)
local resultPart = {}
local resultPart = {}
local requirements = p.getObstacleRequirements(obstacle)
local requirements = p.getObstacleRequirements(obstacle)
Line 100: Line 100:
end
end


function p._getObstacleCosts(obstacle)
local function formatObstacleCosts(obstacle)
local costs = {}
local costs = {}
local obstacleCosts = p.getObstacleCosts(obstacle)
local obstacleCosts = p.getObstacleCosts(obstacle)
Line 168: Line 168:


--Grabbing requirements to create
--Grabbing requirements to create
result = result..'|| ' .. p._getObstacleRequirements(obst)
result = result..'|| ' .. formatObstacleRequirements(obst)


--Finally, the cost
--Finally, the cost
result = result..'|| data-sort-value="'..obst.gpCost..'"|'..p._getObstacleCosts(obst)
result = result..'|| data-sort-value="'..obst.gpCost..'"|'..formatObstacleCosts(obst)
end
end


Line 202: Line 202:


--Finally, the cost
--Finally, the cost
result = result..'|| data-sort-value="'..pill.gpCost..'"|'..p._getObstacleCosts(pill)
result = result..'|| data-sort-value="'..pill.gpCost..'"|'..formatObstacleCosts(pill)
end
end


Line 284: Line 284:


--Grabbing requirements to create
--Grabbing requirements to create
result = result..'|| ' .. p._getObstacleRequirements(obst)
result = result..'|| ' .. formatObstacleRequirements(obst)


--Finally, the cost
--Finally, the cost
result = result..'|| data-sort-value="'..obst.gpCost..'"|'..p._getObstacleCosts(obst)
result = result..'|| data-sort-value="'..obst.gpCost..'"|'.. formatObstacleCosts(obst)
end
end


2,875

edits