use std::path::PathBuf; use askama::Template; use crate::{common::materials::MaterialDrops, create_file}; const MATERIAL_KINDS: &[&str] = &[ "lucid", "spirit", "power", "blaze", "frost", "thunder", "shiny", "bright", "mystery", "gale", "mythril", ]; const DROPS_PATH: &str = "./input/kh1/drops"; #[derive(Template)] #[template(path = "pages/kh1/drops.html")] struct DropsTemplate { pub drops: Vec, } pub fn init() { tracing::info!("Loading enemy drops data from {}", DROPS_PATH); let drops = MaterialDrops::import(DROPS_PATH); tracing::info!("Generating the KH1 drops template"); let drops_template = DropsTemplate { drops }; create_file("./out/kh1", "drops", drops_template.render().unwrap()).unwrap(); }