diff options
Diffstat (limited to 'src/systems/makefloor.rs')
| -rw-r--r-- | src/systems/makefloor.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/systems/makefloor.rs b/src/systems/makefloor.rs index 209d965..8b550bc 100644 --- a/src/systems/makefloor.rs +++ b/src/systems/makefloor.rs @@ -11,17 +11,17 @@ use specs::{ use super::super::components::Position; use super::super::resources::{ - Floor + Ground }; pub struct MakeFloor; impl <'a> System<'a> for MakeFloor { - type SystemData = (Entities<'a>, Write<'a, Floor>, ReadStorage<'a, Position>); - fn run(&mut self, (entities, mut floor, positions): Self::SystemData) { - floor.cells.clear(); + type SystemData = (Entities<'a>, Write<'a, Ground>, ReadStorage<'a, Position>); + fn run(&mut self, (entities, mut ground, positions): Self::SystemData) { + ground.cells.clear(); for (ent, pos) in (&entities, &positions).join() { - floor.cells.entry(pos.pos).or_insert(Vec::new()).push(ent); + ground.cells.entry(pos.pos).or_insert(Vec::new()).push(ent); } } } |
