bevy/crates
Zachary Harrold 20813aed64
Handle TriggerTargets that are combinations for components/entities (#18024)
# Objective

* Fixes https://github.com/bevyengine/bevy/issues/14074
* Applies CI fixes for #16326

It is currently not possible to issues a trigger that targets a specific
list of components AND a specific list of entities

## Solution

We can now use `((A, B), (entity_1, entity_2))` as a trigger target, as
well as the reverse

## Testing

Added a unit test.

The triggering rules for observers are quite confusing:

Triggers once per entity target

For each entity target, an observer system triggers if any of its
components matches the trigger target components (but it triggers at
most once, since we use an internal counter to make sure that an
observer can run at most once per entity target)

(copied from #14563)
(copied from #16326)

## Notes

All credit to @BenjaminBrienen and @cBournhonesque! Just applying a
small fix to this PR so it can be merged.

---------

Co-authored-by: Benjamin Brienen <Benjamin.Brienen@outlook.com>
Co-authored-by: Christian Hughes <xdotdash@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-02-24 23:57:34 +00:00
..
bevy_a11y Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_animation Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_app Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_asset Make adding a subasset label return a result for if there is a duplicate label. (#18013) 2025-02-24 21:51:40 +00:00
bevy_audio Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_color Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_core_pipeline Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_derive Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_dev_tools Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_diagnostic Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_dylib Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_ecs Handle TriggerTargets that are combinations for components/entities (#18024) 2025-02-24 23:57:34 +00:00
bevy_encase_derive Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_gilrs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_gizmos Incorporate OIT into MeshPipelineKey used by the LineGizmoPipeline (#17946) 2025-02-24 21:31:54 +00:00
bevy_gltf Make adding a subasset label return a result for if there is a duplicate label. (#18013) 2025-02-24 21:51:40 +00:00
bevy_image Load and convert RGB8 dds textures (#12952) 2025-02-24 20:45:56 +00:00
bevy_input Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_input_focus Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_internal Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_log Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_macro_utils Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_math Add core Error to InvalidDirectionError (#17820) 2025-02-24 21:04:22 +00:00
bevy_mesh Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_mikktspace Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_pbr Cache opaque deferred entities so we don't have to continuously re-queue them. (#18007) 2025-02-24 21:44:24 +00:00
bevy_picking Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_platform_support Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_ptr Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_reflect Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_remote Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_render Cache opaque deferred entities so we don't have to continuously re-queue them. (#18007) 2025-02-24 21:44:24 +00:00
bevy_scene Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_sprite Add uv_transform to ColorMaterial (#17879) 2025-02-24 21:17:26 +00:00
bevy_state Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_tasks Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_text Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_time Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_transform Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_ui Remove camera from UiBatch (#17663) 2025-02-24 20:55:30 +00:00
bevy_utils Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_window Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_winit Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00