diff options
| author | troido <troido@protonmail.com> | 2020-02-09 00:49:57 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-09 00:49:57 +0100 |
| commit | d46bff6850237064cbfa90a54b4aca22170bbaf7 (patch) | |
| tree | 100177d22fcc5b6950b980c59eaafa193ba2d144 /src/systems/makefloor.rs | |
| parent | 624b3a94b498d7410049d2227568534c118a9f7d (diff) | |
cleanup/rename makefloor to registernew
Diffstat (limited to 'src/systems/makefloor.rs')
| -rw-r--r-- | src/systems/makefloor.rs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/systems/makefloor.rs b/src/systems/makefloor.rs deleted file mode 100644 index 689fcec..0000000 --- a/src/systems/makefloor.rs +++ /dev/null @@ -1,41 +0,0 @@ - -use std::collections::HashSet; - -use specs::{ - ReadStorage, - Write, - Entities, - System, - Join -}; - -use crate::components::{ - Position, - New, - Moved, - Removed -}; - -use crate::resources::{ - Ground -}; - - -#[derive(Default)] -pub struct MakeFloor; -impl <'a> System<'a> for MakeFloor { - type SystemData = ( - Entities<'a>, - Write<'a, Ground>, - ReadStorage<'a, Position>, - ReadStorage<'a, New>, - ReadStorage<'a, Moved>, - ReadStorage<'a, Removed> - ); - fn run(&mut self, (entities, mut ground, positions, new, moved, removed): Self::SystemData) { - for (ent, pos, _new) in (&entities, &positions, &new).join() { - ground.cells.entry(pos.pos).or_insert(HashSet::new()).insert(ent); - } - } -} - |
