lsp_core/feature/
save.rs

1use bevy_ecs::{schedule::ScheduleLabel, world::World};
2
3pub use crate::systems::{validate_shapes, validate_with_updated_shapes};
4
5/// [`ScheduleLabel`] related to the OnSave schedule
6#[derive(ScheduleLabel, Clone, Eq, PartialEq, Debug, Hash)]
7pub struct Label;
8
9pub fn setup_schedule(world: &mut World) {
10    let mut on_save = bevy_ecs::schedule::Schedule::new(Label);
11    on_save.add_systems((validate_shapes, validate_with_updated_shapes));
12    world.add_schedule(on_save);
13}