add support for map id
This commit is contained in:
parent
fd4be76599
commit
341cd7aa6e
@ -46,13 +46,23 @@ for _, game in next, API.GAMES do
|
|||||||
if k=='count' then return self.count end
|
if k=='count' then return self.count end
|
||||||
|
|
||||||
-- Just to make sure it goes in the right order
|
-- Just to make sure it goes in the right order
|
||||||
|
if type(k)=='string' then
|
||||||
for i = 1, self.count do
|
for i = 1, self.count do
|
||||||
local v = self[i]
|
local v = self[i]
|
||||||
|
|
||||||
if type(v) == 'table' and v.DisplayName:lower():find(k:lower()) then
|
if type(v) == 'table' and v.DisplayName:lower():find(tostring(k):lower()) then
|
||||||
return v
|
return v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif type(k)=='number' then
|
||||||
|
for i = 1, self.count do
|
||||||
|
local v = self[i]
|
||||||
|
|
||||||
|
if type(v) == 'table' and v.ID==k then
|
||||||
|
return v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end})
|
end})
|
||||||
|
|
||||||
maps.count = count
|
maps.count = count
|
||||||
|
Loading…
Reference in New Issue
Block a user