use godot::prelude::*;

use crate::data::hazard_def::HazardDef;

#[derive(GodotClass)]
#[class(base=Resource)]
pub struct DayConfig {
    #[export]
    pub day_number: i32,
    #[export]
    pub day_title: GString,
    #[export]
    pub target_weight: f32,
    #[export]
    pub gravity: f32,
    #[export]
    pub mini_game_scene: Option<Gd<PackedScene>>,
    #[export]
    pub available_hazards: Array<Gd<HazardDef>>,

    base: Base<Resource>,
}

#[godot_api]
impl IResource for DayConfig {
    fn init(base: Base<Resource>) -> Self {
        Self {
            day_number: 0,
            day_title: "Day 1".into(),
            target_weight: 100.0,
            gravity: 2.0,
            mini_game_scene: None,
            available_hazards: Array::new(),
            base,
        }
    }
}
