From b954588b0e67ba04d767ba8aae30aae20a734616 Mon Sep 17 00:00:00 2001 From: kurokuukyo Date: Mon, 20 Apr 2026 20:11:08 -0400 Subject: [PATCH] local NOOP fn --- src/jecs.luau | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/jecs.luau b/src/jecs.luau index a602052..6fbfec5 100755 --- a/src/jecs.luau +++ b/src/jecs.luau @@ -3311,27 +3311,29 @@ local function world_new(DEBUG: boolean?) end local function world_targets(world: world, entity: i53, relation: i53): () -> i53? + local NOOP = NOOP :: () -> i53 + local record = entity_index_try_get_unsafe(entity) if not record then - return NOOP :: () -> i53 + return NOOP end local archetype = record.archetype if not archetype then - return NOOP :: () -> i53 + return NOOP end local r = ECS_PAIR(relation, EcsWildcard) local idr = world.component_index[r] if not idr then - return NOOP :: () -> i53 + return NOOP end local archetype_id = archetype.id local count = idr.counts[archetype_id] if not count then - return NOOP :: () -> i53 + return NOOP end local nth = idr.records[archetype_id]