From 9187829c698880b7299d666aaa8492a89290faa7 Mon Sep 17 00:00:00 2001 From: Ukendio Date: Wed, 3 Jan 2024 20:44:13 +0100 Subject: [PATCH 1/4] Ignore nested Packages --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c7e3d5be..57eb4b21 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ luac.out *.hex DevPackages +/*/Packages roblox.toml build *.rbxl From b7ba7faa132f9a395b4698163b2f492c1d6e22de Mon Sep 17 00:00:00 2001 From: Ukendio Date: Wed, 3 Jan 2024 20:44:29 +0100 Subject: [PATCH 2/4] Fix regression from Packages --- example.project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example.project.json b/example.project.json index 9cb3291e..a0478e6f 100644 --- a/example.project.json +++ b/example.project.json @@ -28,7 +28,7 @@ "$path": "example/assets/assets.rbxm" }, "Lib": { - "$path": "Packages", + "$className": "Folder", "Matter": { "$path": "lib" } From d40071ae4b81c65510383031294fefabd4c38e84 Mon Sep 17 00:00:00 2001 From: Ukendio Date: Mon, 22 Jan 2024 21:27:07 +0100 Subject: [PATCH 3/4] Add cases for hotpathing --- lib/World.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/World.lua b/lib/World.lua index 91f5f333..e45b4afa 100644 --- a/lib/World.lua +++ b/lib/World.lua @@ -584,6 +584,20 @@ function World:query(...) return end + if queryLength == 1 then + return entityId, entityData[metatables[1]] + elseif queryLength == 2 then + return entityId, entityData[metatables[1]], entityData[metatables[2]] + elseif queryLength == 3 then + return entityId, entityData[metatables[1]], entityData[metatables[2]], entityData[metatables[3]] + elseif queryLength == 4 then + return entityId, + entityData[metatables[1]], + entityData[metatables[2]], + entityData[metatables[3]], + entityData[metatables[4]] + end + for i, metatable in ipairs(metatables) do queryOutput[i] = entityData[metatable] end From 7eb1513097febbe21fcad81bb8bf9a0b80e5cfb1 Mon Sep 17 00:00:00 2001 From: Ukendio Date: Sat, 27 Jan 2024 12:59:13 +0100 Subject: [PATCH 4/4] Add for 5 in queryLength --- lib/World.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/World.lua b/lib/World.lua index e45b4afa..a8d4ff30 100644 --- a/lib/World.lua +++ b/lib/World.lua @@ -596,6 +596,13 @@ function World:query(...) entityData[metatables[2]], entityData[metatables[3]], entityData[metatables[4]] + elseif queryLength == 5 then + return entityId, + entityData[metatables[1]], + entityData[metatables[2]], + entityData[metatables[3]], + entityData[metatables[4]], + entityData[metatables[5]] end for i, metatable in ipairs(metatables) do