summaryrefslogtreecommitdiff
path: root/src/map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.rs')
-rw-r--r--src/map.rs5
1 files changed, 3 insertions, 2 deletions
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<Point2<f32>> {
+ pub fn get_spawn_points(&self, character: Character) -> Vec<Point2<f32>> {
self.spawns
.clone()
.into_iter()
- .filter(|s| s.0 == name)
+ .filter(|s| s.0 == character.to_str())
.map(|s| s.1)
.collect()
}