2,875
edits
(Add public functions to grab obstacle requirements and costs) |
No edit summary |
||
Line 70: | Line 70: | ||
end | end | ||
function | 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 | 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..'|| ' .. | result = result..'|| ' .. formatObstacleRequirements(obst) | ||
--Finally, the cost | --Finally, the cost | ||
result = result..'|| data-sort-value="'..obst.gpCost..'"|'.. | 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..'"|'.. | 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..'|| ' .. | result = result..'|| ' .. formatObstacleRequirements(obst) | ||
--Finally, the cost | --Finally, the cost | ||
result = result..'|| data-sort-value="'..obst.gpCost..'"|'.. | result = result..'|| data-sort-value="'..obst.gpCost..'"|'.. formatObstacleCosts(obst) | ||
end | end | ||
edits