use godot::{classes::Curve, prelude::*};

#[derive(GodotClass)]
#[class(base=Resource)]
pub struct TunnelConfig {
    #[export]
    pub vision_narrow_rate: f32,
    #[export]
    pub vision_recover_rate: f32,
    #[export]
    pub max_tunnel_intensity: f32,
    #[export]
    pub vision_curve: Option<Gd<Curve>>,

    base: Base<Resource>,
}

#[godot_api]
impl IResource for TunnelConfig {
    fn init(base: Base<Resource>) -> Self {
        Self {
            vision_narrow_rate: 0.5,
            vision_recover_rate: 2.0,
            max_tunnel_intensity: 0.95,
            vision_curve: None,
            base,
        }
    }
}
