From 027b6b9bb2af8e355e9960474a92f65c262e3e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Reuh=20Fildadut?= Date: Mon, 27 Dec 2021 12:22:24 +0100 Subject: [PATCH] ecs: System.filter defined using tables use all instead of any --- docs/index.html | 2 +- docs/modules/asset.html | 2 +- docs/modules/ecs.html | 4 ++-- docs/modules/ldtk.html | 6 +++--- docs/modules/scene.html | 2 +- docs/modules/signal.html | 2 +- docs/modules/timer.html | 2 +- docs/modules/ubiquitousse.html | 2 +- docs/modules/util.html | 2 +- docs/topics/LICENSE.html | 2 +- docs/topics/README.md.html | 2 +- ecs/ecs.can | 4 ++-- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/index.html b/docs/index.html index c20553c..bb97875 100644 --- a/docs/index.html +++ b/docs/index.html @@ -108,7 +108,7 @@
generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
diff --git a/docs/modules/asset.html b/docs/modules/asset.html index ebc5242..49f12be 100644 --- a/docs/modules/asset.html +++ b/docs/modules/asset.html @@ -334,7 +334,7 @@
generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
diff --git a/docs/modules/ecs.html b/docs/modules/ecs.html index e93bbe2..3801842 100644 --- a/docs/modules/ecs.html +++ b/docs/modules/ecs.html @@ -750,7 +750,7 @@ avoid repeating your filters or allow controlling several system from a single p Called when checking if an entity should be added to this system. Returns true if the entity should be added to this system (and therefore its subsystems).

-

If this is a string or a table, it will be converted to a filter function on instanciation using ecs.any.

+

If this is a string or a table, it will be converted to a filter function on instanciation using ecs.all.

If this true, will accept every entity; if false, reject every entity.

@@ -1597,7 +1597,7 @@ its sibling systems (i.e. completely stop the propagation of the event).
generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
diff --git a/docs/modules/ldtk.html b/docs/modules/ldtk.html index 15a6ac7..259ab81 100644 --- a/docs/modules/ldtk.html +++ b/docs/modules/ldtk.html @@ -1754,7 +1754,7 @@ end Level background.

If there is a background image, background.image contains a table {image=image, x=number, y=number, sx=number, sy=number} - where image is the LÖVE image (or image filepath if LÖVE not available) x and y are the top-left position, + where image is the LÖVE image (or image filepath if LÖVE not available) x and y are the top-left position, and sx and sy the horizontal and vertical scale factors. @@ -1829,7 +1829,7 @@ end

  • Enum are converted into a Lua string giving the currently selected enum value.
  • Filepath are converted into a Lua string giving the file path.
  • Arrays are converted into a Lua table with the elements in it as a list.
  • -
  • Points are converted into a Lua table with the fields x and y: { x=number, y=number }.
  • +
  • Points are converted into a Lua table with the fields x and y: { x=number, y=number }.
  • Colors are converted into a Lua table with the red, green and blue components in [0-1] as a list: {r,g,b}.
  • @@ -1855,7 +1855,7 @@ end
    generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
    diff --git a/docs/modules/scene.html b/docs/modules/scene.html index 043130d..90c755f 100644 --- a/docs/modules/scene.html +++ b/docs/modules/scene.html @@ -702,7 +702,7 @@
    generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
    diff --git a/docs/modules/signal.html b/docs/modules/signal.html index 8caf569..2dd7a3f 100644 --- a/docs/modules/signal.html +++ b/docs/modules/signal.html @@ -414,7 +414,7 @@
    generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
    diff --git a/docs/modules/timer.html b/docs/modules/timer.html index 48ec8f3..1195cda 100644 --- a/docs/modules/timer.html +++ b/docs/modules/timer.html @@ -1153,7 +1153,7 @@
    generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
    diff --git a/docs/modules/ubiquitousse.html b/docs/modules/ubiquitousse.html index 96b312a..407cc98 100644 --- a/docs/modules/ubiquitousse.html +++ b/docs/modules/ubiquitousse.html @@ -362,7 +362,7 @@
    generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
    diff --git a/docs/modules/util.html b/docs/modules/util.html index ab95eb3..5a882df 100644 --- a/docs/modules/util.html +++ b/docs/modules/util.html @@ -784,7 +784,7 @@
    generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
    diff --git a/docs/topics/LICENSE.html b/docs/topics/LICENSE.html index 79ece54..f5f93a0 100644 --- a/docs/topics/LICENSE.html +++ b/docs/topics/LICENSE.html @@ -64,7 +64,7 @@
    generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
    diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index 6dd1a70..a769017 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -71,7 +71,7 @@
    generated by LDoc 1.4.6 -Last updated 2021-12-26 18:43:30 +Last updated 2021-12-27 12:20:29
    diff --git a/ecs/ecs.can b/ecs/ecs.can index fcae56e..6890056 100644 --- a/ecs/ecs.can +++ b/ecs/ecs.can @@ -271,7 +271,7 @@ let system_mt = { --- Called when checking if an entity should be added to this system. -- Returns `true` if the entity should be added to this system (and therefore its subsystems). -- - -- If this is a string or a table, it will be converted to a filter function on instanciation using ecs.any. + -- If this is a string or a table, it will be converted to a filter function on instanciation using `ecs.all`. -- -- If this `true`, will accept every entity; if `false`, reject every entity. -- @@ -735,7 +735,7 @@ let recInstanciateSystems = (world, systems) if type(s.filter) == "string" then system.filter = (_, e) return e[s.filter] ~= nil end elseif type(s.filter) == "table" then - system.filter = ecs.any(unpack(s.filter)) + system.filter = ecs.all(unpack(s.filter)) elseif type(s.filter) == "boolean" then if s.filter then system.filter = alwaysTrue