diff --git a/rokit.toml b/rokit.toml index 9488feb..d2b2548 100755 --- a/rokit.toml +++ b/rokit.toml @@ -1,5 +1,5 @@ -[tools] -wally = "upliftgames/wally@0.3.2" -rojo = "rojo-rbx/rojo@7.7.0-rc.1" -luau = "luau-lang/luau@0.703.0" +[tools] +wally = "upliftgames/wally@0.3.2" +rojo = "rojo-rbx/rojo@7.7.0-rc.1" +luau = "luau-lang/luau@0.703.0" zune = "scythe-technology/zune@0.5.1" \ No newline at end of file diff --git a/src/jecs.luau b/src/jecs.luau index 3a20259..8fb97b2 100755 --- a/src/jecs.luau +++ b/src/jecs.luau @@ -3864,12 +3864,24 @@ local function world_new(DEBUG: boolean?) return world end -local function ecs_is_tag(world: world, entity: i53): boolean - local idr = world.component_index[entity] +local function ecs_is_tag(world: world, id: i53): boolean + local idr = world.component_index[id] if idr then return bit32.btest(idr.flags, ECS_ID_IS_TAG) end - return not WORLD_HAS(world, entity, EcsComponent) + if ECS_IS_PAIR(id) then + local relation = entity_index_get_alive(entity_index, ECS_PAIR_FIRST(id)) :: i53 + if not relation then + return false + end + if WORLD_HAS(world, relation, EcsComponent) then + return false + end + local target = entity_index_get_alive(entity_index, ECS_PAIR_SECOND(id)) :: i53 + if not target then return false end + return not WORLD_HAS(world, target, EcsComponent) + end + return not WORLD_HAS(world, id, EcsComponent) end local function ecs_entity_record(world: world, entity: i53)