From ebf13bcd8e8ab799c56961e6bc1779bd8031a8dc Mon Sep 17 00:00:00 2001 From: tom barrett Date: Mon, 19 Aug 2019 02:26:17 -0500 Subject: created abstraction between world and game, added temlate for dialogtrees --- src/map.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map.rs') diff --git a/src/map.rs b/src/map.rs index 124125a..9bb3b47 100644 --- a/src/map.rs +++ b/src/map.rs @@ -7,6 +7,7 @@ use xml::reader::XmlEvent::Characters; use crate::constants; use crate::entity::Operable; use crate::layer::Layer; +use crate::npc::Character; use crate::tile::Tile; use crate::tileset::Tileset; use crate::xmlelements::XMLElements; @@ -90,11 +91,11 @@ impl Map { spawn_points } - pub fn get_spawn_points(&self, name: &str) -> Vec> { + pub fn get_spawn_points(&self, character: Character) -> Vec> { self.spawns .clone() .into_iter() - .filter(|s| s.0 == name) + .filter(|s| s.0 == character.to_str()) .map(|s| s.1) .collect() } -- cgit v1.2.3