Merge pull request #3 from CoolestDoggo/main

Fix map finding
This commit is contained in:
tommy aka doge 2022-09-10 19:31:52 -04:00 committed by GitHub
commit bf71f90171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,11 @@ for _,game in next,API.GAMES do
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)
if i=='count' then return self.count end
if not tonumber(i) then