bevy/crates
Ben Frankel ee88d79d88
Simplify run conditions (#14441)
# Objective

Simplify Bevy-provided functions that return a condition-satisfying
closure instead of just being the condition.

## Solution

Become the condition.

## Testing

I did not test. Game jamming. Hopefully CI passes.

---

## Migration Guide

Some run conditions have been simplified.

```rust
// Before:
app.add_systems(Update, (
    system_0.run_if(run_once()),
    system_1.run_if(resource_changed_or_removed::<T>()),
    system_2.run_if(resource_removed::<T>()),
    system_3.run_if(on_event::<T>()),
    system_4.run_if(any_component_removed::<T>()),
));

// After:
app.add_systems(Update, (
    system_0.run_if(run_once),
    system_1.run_if(resource_changed_or_removed::<T>),
    system_2.run_if(resource_removed::<T>),
    system_3.run_if(on_event::<T>),
    system_4.run_if(any_component_removed::<T>),
));
```
2024-07-22 19:21:47 +00:00
..
bevy_a11y Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_animation Fix repeated animation transition bug (#14411) 2024-07-22 19:17:46 +00:00
bevy_app Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_asset Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_audio Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_color Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_core Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_core_pipeline Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_derive Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_dev_tools Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_diagnostic Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_dylib Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_dynamic_plugin Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_ecs Simplify run conditions (#14441) 2024-07-22 19:21:47 +00:00
bevy_encase_derive Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_gilrs Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_gizmos Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_gltf Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_hierarchy Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_input Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_internal Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_log Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_macro_utils Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_math Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_mikktspace Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_pbr Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_picking Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_ptr Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_reflect Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_render Added AstcBlock and AstcChannel to the forwarded wgpu types. (#14410) 2024-07-22 19:14:14 +00:00
bevy_scene Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_sprite Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_state Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_tasks Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_text feat: expose the default font bytes (#14406) 2024-07-22 19:09:39 +00:00
bevy_time Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_transform Only propagate transforms entities with GlobalTransforms. (#14384) 2024-07-22 19:07:21 +00:00
bevy_ui Fix error in bevy_ui when building without bevy_text (#14430) 2024-07-22 19:19:10 +00:00
bevy_utils Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_window Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00
bevy_winit Remove manual --cfg docsrs (#14376) 2024-07-22 18:58:04 +00:00