From 32dd60bca02cf2cfccc8d4309691df9f2f84398c Mon Sep 17 00:00:00 2001 From: troido Date: Tue, 18 Feb 2020 02:27:21 +0100 Subject: refactoring: roomid is now a type, not string anymore --- src/playerstate.rs | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'src/playerstate.rs') diff --git a/src/playerstate.rs b/src/playerstate.rs index e68e890..d06e3e7 100644 --- a/src/playerstate.rs +++ b/src/playerstate.rs @@ -5,13 +5,14 @@ use crate::template::Template; use crate::{ componentwrapper::{ComponentWrapper, PreEntity}, PlayerId, + RoomId, components::{Visible, Player, Inventory, Health, Item} }; #[derive(Debug, Clone)] pub struct PlayerState { - pub name: String, - pub room: String, + pub id: PlayerId, + pub room: Option, pub inventory_capacity: usize, pub inventory: Vec