Fix map finding

This commit is contained in:
CoolestDoggo 2022-09-10 19:25:16 -04:00
parent 6dda6334b6
commit 5a6b6ac82e

View File

@ -20,6 +20,11 @@ for _,game in next,API.GAMES do
end end
end end
end end
table.sort(maps, function(a, b)
a = type(a) == 'table' and a or -1
b = type(b) == 'table' and b or -1
return #a.DisplayName < #b.DisplayName
end)
setmetatable(maps,{__index=function(self,i) setmetatable(maps,{__index=function(self,i)
if i=='count' then return self.count end if i=='count' then return self.count end
if not tonumber(i) then if not tonumber(i) then