mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-05 05:43:55 -04:00
parent
89eab3fb72
commit
695cc2dfe3
4 changed files with 51 additions and 20 deletions
|
@ -30,10 +30,14 @@ end
|
|||
-- @tparam Entity e Entity to check
|
||||
-- @treturn boolean
|
||||
function Pool:eligible(e)
|
||||
for i=#self.__filter, 1, -1 do
|
||||
local component = self.__filter[i].__name
|
||||
for i=#self.__filter.require, 1, -1 do
|
||||
local name = self.__filter.require[i]
|
||||
if not e[name] then return false end
|
||||
end
|
||||
|
||||
if not e[component] then return false end
|
||||
for i=#self.__filter.reject, 1, -1 do
|
||||
local name = self.__filter.reject[i]
|
||||
if e[name] then return false end
|
||||
end
|
||||
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue