mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-25 12:42:10 -05:00
convinced the event library to handle non-string filters
This commit is contained in:
parent
ce6e405934
commit
9dd7ec1889
@ -13,8 +13,12 @@ function event.pull(t,...) -- return an event, optionally with timeout *t* and f
|
|||||||
tEv = {coroutine.yield()}
|
tEv = {coroutine.yield()}
|
||||||
local ret = true
|
local ret = true
|
||||||
for i = 1, #tA do
|
for i = 1, #tA do
|
||||||
if not (tEv[i] or ""):match(tA[i]) then
|
if type(tEv[i]) == "string" and type(tA[i]) == "string" then
|
||||||
ret = false
|
if not (tEv[i] or ""):match(tA[i]) then
|
||||||
|
ret = false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ret = tEv[i] == tA[i]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if ret then return table.unpack(tEv) end
|
if ret then return table.unpack(tEv) end
|
||||||
|
Loading…
Reference in New Issue
Block a user