Module:Calculator/AgilityObstacle: Difference between revisions

Potential fix for AgilityCourseTable template
m (Fix derp again)
(Potential fix for AgilityCourseTable template)
Line 46: Line 46:
slot = 'Pillar'
slot = 'Pillar'
end
end
elseif string.find(name, 'Obelisk') then
slot = 'Obelisk'
else
else
slot = obstacle.category + 1
slot = obstacle.category + 1
Line 123: Line 125:
local sortFunc = function(a, b)
local sortFunc = function(a, b)
-- Special case to sort pillars AFTER all regular obstacles.
-- Special case to sort pillars AFTER all regular obstacles.
     local pillar = { ["Pillar"] = 99, ["Elite Pillar"] = 100 }
     local pillar = { ["Pillar"] = 99, ["Elite Pillar"] = 100, ["Obelisk"] = 60 }
return (pillar[a.Slot] or a.Slot) < (pillar[b.Slot] or b.Slot)
return (pillar[a.Slot] or a.Slot) < (pillar[b.Slot] or b.Slot)
end
end