use std::collections::HashMap; use serde_json::{Value, json}; use crate::{ Template, componentwrapper::{ComponentWrapper, PreEntity}, PlayerId, RoomId, components::{ Visible, Player, Inventory, Health, Fighter, Healing, Movable, AttackType, Autofight, Faction, Equipment, equipment::Slot }, Result, aerr, Sprite, Encyclopedia, Pos, hashmap }; #[derive(Debug, Clone)] pub enum RoomPos { Pos(Pos), Name(String), Unknown } #[derive(Debug, Clone)] pub struct PlayerState { pub id: PlayerId, pub room: Option, pub pos: RoomPos, pub inventory_capacity: usize, pub inventory: Vec