From f79e757eeacc0265f43086e6bf2c8e4453fc2382 Mon Sep 17 00:00:00 2001 From: Ukendio Date: Mon, 29 Apr 2024 01:57:33 +0200 Subject: [PATCH] Return self --- lib/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/init.lua b/lib/init.lua index d2b4aa0..9036379 100644 --- a/lib/init.lua +++ b/lib/init.lua @@ -409,7 +409,7 @@ function World.query(world: World, ...: i53): any function preparedQuery:without(...) local components = { ... } for i, component in components do - components[i] = #component + components[i] = component end for i = #compatibleArchetypes, 1, - 1 do local archetype = compatibleArchetypes[i].archetype @@ -424,9 +424,11 @@ function World.query(world: World, ...: i53): any table.remove(compatibleArchetypes, i) end end + return self end local lastRow + function preparedQuery:__iter() return function() local archetype = compatibleArchetype.archetype