use serde::Deserialize;

#[derive(Deserialize, Debug)]
pub struct ConfigSwitchSection {
    pub section_id: u32,
    pub transform: String,
    pub camera_x: u32,
    pub camera_y: u32,
}

impl ConfigSwitchSection {
    pub fn to_protocol(&self) -> ::proto::ActionSwitchSection {
        ::proto::ActionSwitchSection {
            section: self.section_id,
            transform: self.transform.clone(),
            camera_x: self.camera_x,
            camera_y: self.camera_y,
            ..Default::default()
        }
    }
}
