diff --git a/docs/learn/concepts/addons.md b/docs/learn/concepts/addons.md index 8a7ba01..769baa9 100644 --- a/docs/learn/concepts/addons.md +++ b/docs/learn/concepts/addons.md @@ -8,17 +8,17 @@ A collection of third-party jecs addons made by the community. If you would like A jecs debugger with a string-based query language and entity editing capabilities. -## [jecs_entity_visualiser](https://github.com/Ukendio/jecs/tree/main/addons/entity_visualiser) +## [jecs_entity_visualiser](https://github.com/Ukendio/jecs/blob/main/addons/entity_visualiser.luau) A simple entity and component visualiser in the output -## [jecs_lifetime_tracker](https://github.com/Ukendio/jecs/tree/main/addons/lifetime_tracker) +## [jecs_lifetime_tracker](https://github.com/Ukendio/jecs/blob/main/addons/lifetime_tracker.luau) A tool for inspecting entity lifetimes # Helpers -## [jecs_observers](https://github.com/Ukendio/jecs/tree/main/addons/observers) +## [jecs_observers](https://github.com/Ukendio/jecs/blob/main/addons/observers.luau) Observers for queries and signals for components @@ -41,4 +41,16 @@ Provides hooks and a scheduler that implements jabby and a topographical runtime An agnostic scheduler inspired by Bevy and Flecs, with core features including phases, pipelines, run conditions, and startup systems. Planck also provides plugins for Jabby, Matter Hooks, and more. +# Replication + +## [feces](https://github.com/NeonD00m/feces) + +A generalized replication system for jecs + +# Input + +## [Axis](https://github.com/NeonD00m/axis) + +An agnostic, simple and versatile input library for ECS + # Observers diff --git a/docs/learn/concepts/component-traits.md b/docs/learn/concepts/component-traits.md index 3b0f1ce..10aa99d 100644 --- a/docs/learn/concepts/component-traits.md +++ b/docs/learn/concepts/component-traits.md @@ -14,6 +14,10 @@ A (component) ID can be marked with `Tag“ in which the component will never con Hooks are part of the "interface" of a component. You could consider hooks as the counterpart to OOP methods in ECS. They define the behavior of a component, but can only be invoked through mutations on the component data. You can only configure a single `OnAdd`, `OnRemove` and `OnSet` hook per component, just like you can only have a single constructor and destructor. +::: warning +Hooks, added to a component that has already been added to other entities/components, will not be called. +::: + ## Examples ::: code-group diff --git a/test/tests.luau b/test/tests.luau index c1630ee..af2f700 100644 --- a/test/tests.luau +++ b/test/tests.luau @@ -633,15 +633,14 @@ TEST("world:each()", function() end end) -FOCUS() TEST("world:entity()", function() - do CASE "range" + do CASE "range" local world = jecs.world() world = lifetime_tracker_add(world, {}) world:range(1000, 2000) world:entity(1590) - CHECK_EXPECT_ERR(function() + CHECK_EXPECT_ERR(function() world:entity(5000) end) @@ -654,7 +653,6 @@ TEST("world:entity()", function() end do CASE "desired id" local world = jecs.world() - world = lifetime_tracker_add(world, {}) local id = world:entity() local e = world:entity(id + 5) CHECK(e == id + 5) @@ -671,8 +669,7 @@ TEST("world:entity()", function() CHECK(e3 == world:entity(e3)) world:delete(e3) - - print("---------------------------") + local e3v1 = world:entity(275) CHECK(not world:contains(275)) CHECK(jecs.ECS_GENERATION(e3v1) == 1) @@ -681,11 +678,7 @@ TEST("world:entity()", function() CHECK(world:contains(e3v1)) -- world:print_entity_index() - print("--------begin") world:entity(e3) - print("-----end") - - world:print_entity_index() world:entity(e3) world:entity(275) diff --git a/tools/testkit.luau b/tools/testkit.luau index 89a6c4a..b352aac 100644 --- a/tools/testkit.luau +++ b/tools/testkit.luau @@ -253,7 +253,6 @@ local function FOCUS() end local function FINISH(): number - local success = true local total_cases = 0 local passed_cases = 0 local passed_focus_cases = 0