Skip to content

Commit

Permalink
Split and remove to pop baseArchetype
Browse files Browse the repository at this point in the history
  • Loading branch information
Ukendio committed Jan 15, 2024
1 parent 3bcd17a commit 16bcf5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/World.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,16 @@ function World:_newQueryArchetype(queryArchetype)

for _, storage in self._storages do
for entityArchetype in storage do
local archetypes = queryArchetype:gmatch("[^x]+")
local baseArchetype = archetypes()
local archetypes = string.split(queryArchetype, "x")
local baseArchetype = table.remove(archetypes, 1)

if not areArchetypesCompatible(baseArchetype, entityArchetype) then
continue
end

local skip = false

for exclude in archetypes do
for _, exclude in archetypes do
if areArchetypesCompatible(exclude, entityArchetype) then
skip = true
break
Expand Down

0 comments on commit 16bcf5a

Please sign in to comment.