Return self

This commit is contained in:
Ukendio 2024-04-29 01:57:33 +02:00
parent f69e4e3b18
commit f79e757eea

View file

@ -409,7 +409,7 @@ function World.query(world: World, ...: i53): any
function preparedQuery:without(...) function preparedQuery:without(...)
local components = { ... } local components = { ... }
for i, component in components do for i, component in components do
components[i] = #component components[i] = component
end end
for i = #compatibleArchetypes, 1, - 1 do for i = #compatibleArchetypes, 1, - 1 do
local archetype = compatibleArchetypes[i].archetype local archetype = compatibleArchetypes[i].archetype
@ -424,9 +424,11 @@ function World.query(world: World, ...: i53): any
table.remove(compatibleArchetypes, i) table.remove(compatibleArchetypes, i)
end end
end end
return self
end end
local lastRow local lastRow
function preparedQuery:__iter() function preparedQuery:__iter()
return function() return function()
local archetype = compatibleArchetype.archetype local archetype = compatibleArchetype.archetype