summaryrefslogtreecommitdiff
path: root/src/systems/view.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-09 00:49:57 +0100
committertroido <troido@protonmail.com>2020-02-09 00:49:57 +0100
commitd46bff6850237064cbfa90a54b4aca22170bbaf7 (patch)
tree100177d22fcc5b6950b980c59eaafa193ba2d144 /src/systems/view.rs
parent624b3a94b498d7410049d2227568534c118a9f7d (diff)
cleanup/rename makefloor to registernew
Diffstat (limited to 'src/systems/view.rs')
-rw-r--r--src/systems/view.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/systems/view.rs b/src/systems/view.rs
index 79078f4..6c0b1f8 100644
--- a/src/systems/view.rs
+++ b/src/systems/view.rs
@@ -2,13 +2,7 @@
use std::collections::{HashMap, HashSet};
use specs::{
- BitSet,
- storage::ComponentEvent,
- ReaderId,
- World,
- SystemData,
ReadStorage,
- WriteStorage,
Read,
Write,
System,
@@ -32,14 +26,14 @@ impl <'a> System<'a> for View {
ReadStorage<'a, Position>,
ReadStorage<'a, Visible>,
Read<'a, Size>,
- WriteStorage<'a, Player>,
+ ReadStorage<'a, Player>,
Write<'a, Output>,
ReadStorage<'a, New>,
ReadStorage<'a, Moved>,
ReadStorage<'a, Removed>,
Read<'a, Ground>
);
- fn run(&mut self, (entities, positions, visible, size, mut players, mut output, new, moved, removed, ground): Self::SystemData) {
+ fn run(&mut self, (entities, positions, visible, size, players, mut output, new, moved, removed, ground): Self::SystemData) {
let mut changed = HashSet::new();
for (pos, _new) in (&positions, &new).join() {
@@ -64,7 +58,7 @@ impl <'a> System<'a> for View {
output.output.clear();
- for (ent, mut player, pos) in (&entities, &mut players, &positions).join() {
+ for (ent, player, pos) in (&entities, &players, &positions).join() {
let mut updates: Vec<WorldUpdate> = Vec::new();
if new.get(ent).is_some() {
let (values, mapping) = draw_room(&ground.cells, (size.width, size.height), &visible);