1
0
Fork 0
roguelike-game/src/raws/item_structs.rs

29 lines
525 B
Rust

use std::collections::HashMap;
use serde::Deserialize;
#[derive(Deserialize, Debug)]
pub struct Raws {
pub items: Vec<Item>,
}
#[derive(Deserialize, Debug)]
pub struct Item {
pub name: String,
pub renderable: Option<Renderable>,
pub consumable: Option<Consumable>,
}
#[derive(Deserialize, Debug)]
pub struct Renderable {
pub glyph: String,
pub fg: String,
pub bg: String,
pub order: i32,
}
#[derive(Deserialize, Debug)]
pub struct Consumable {
pub effects: HashMap<String, String>,
}