1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! implementation of `EvoIOPlugin`

use bevy::prelude::*;

use crate::contorl::update::block_action;

use super::{export::export, import::{load_blobs, clean}};

/// all implementations relate to import and export (save and load)
/// 
/// include
/// - load from file
/// - save to file
/// - clean field
/// - automatic checkpoint save
pub struct EvoIOPlugin;

impl Plugin for EvoIOPlugin {
    fn build(&self, app: &mut App) {
        app
        .add_systems(Update, (
            export,
            clean.after(block_action),
            load_blobs.after(clean),
        ))
        ;
    }
}