special case for certain maps (lua string pattern issue)

This commit is contained in:
tommy aka doge 2022-09-11 23:00:12 -04:00
parent ce235642b4
commit 6b2a341be5

View File

@ -49,8 +49,7 @@ for _, game in next, API.GAMES do
if type(k)=='string' then
for i = 1, self.count do
local v = self[i]
if type(v) == 'table' and v.DisplayName:lower():find(tostring(k):lower()) then
if type(v) == 'table' and v.DisplayName:lower():find(tostring(k:gsub('%%', '%%%%'):gsub('^%^', '%%^'):gsub('%$$', '%%$'):gsub('%(', '%%('):gsub('%)', '%%)'):gsub('%.', '%%.'):gsub('%[', '%%['):gsub('%]', '%%]'):gsub('%*', '%%*'):gsub('%+', '%%+'):gsub('%-', '%%-'):gsub('%?', '%%?')):lower()) then
return v
end
end