2,869
edits
No edit summary |
No edit summary |
||
Line 237: | Line 237: | ||
local function getTotalBonuses(obstacles) | local function getTotalBonuses(obstacles) | ||
local bonuses = {} | local bonuses = {} | ||
for _, obstacle in pairs(obstacles) do | for _, obstacle in pairs(obstacles) do | ||
for bonusName, bonusValue in pairs(obstacle.Obstacle.modifiers) do | for bonusName, bonusValue in pairs(obstacle.Obstacle.modifiers) do | ||
table.insert(bonuses, {name = bonusName, value = bonusValue}) | |||
end | end | ||
end | end | ||
table.sort(bonuses, function(a, b) return a.name < b.name end) | |||
local ret = {} | local ret = {} | ||
Line 305: | Line 303: | ||
function p.test() | function p.test() | ||
local | local obstacles = {"Rope Climb","Monkey Bars"," Balance Seesaw","Elite Pillar of Conflict"} | ||
local obs = p._getCourseTable(obstacles) | |||
Debug.log(obs) | |||
end | end | ||
return p | return p |
edits