use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct StatBoosts { pub pace: i32, pub shooting: i32, pub passing: i32, pub dribbling: i32, pub defending: i32, pub physical: i32, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ChemistryStyle { pub id: String, pub name: String, pub description: String, pub boosts: StatBoosts, } pub fn load_chemistry_styles(data_dir: &str) -> anyhow::Result> { let path = format!("{data_dir}/chemistry_styles.json"); let raw = std::fs::read_to_string(&path) .map_err(|e| anyhow::anyhow!("failed to read {path}: {e}"))?; Ok(serde_json::from_str(&raw)?) }