use serde::Deserialize; use std::collections::HashMap; #[derive(Deserialize, Debug)] pub struct Item { pub id: String, pub name: Name, pub renderable: Option, pub class: String, pub weight: Option, pub value: Option, pub equip: Option, pub flags: Option>, pub effects: Option>, pub magic: Option, } #[derive(Deserialize, Debug)] pub struct Name { pub name: String, pub plural: String, } #[derive(Deserialize, Debug)] pub struct Equippable { pub flag: String, pub damage: String, pub to_hit: Option, } #[derive(Deserialize, Debug)] pub struct Renderable { pub glyph: String, pub fg: String, pub bg: String, pub order: i32, } #[derive(Deserialize, Debug)] pub struct MagicItem { pub class: String, pub naming: String, }