From 5a6b6ac82e22627a76d38da1a8a1807217bc3ecc Mon Sep 17 00:00:00 2001 From: CoolestDoggo <40402235+CoolestDoggo@users.noreply.github.com> Date: Sat, 10 Sep 2022 19:25:16 -0400 Subject: [PATCH] Fix map finding --- src/modules/commands/maps_init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/commands/maps_init.lua b/src/modules/commands/maps_init.lua index 1b903ed..ca0850f 100644 --- a/src/modules/commands/maps_init.lua +++ b/src/modules/commands/maps_init.lua @@ -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 -- 2.45.2