summaryrefslogtreecommitdiff
path: root/src/systems
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-23 11:28:00 +0100
committertroido <troido@protonmail.com>2020-02-23 11:28:00 +0100
commitd722e9b374dce358aeb9deb7298284fb07b1a5f5 (patch)
treea34138fc14fe56813eed2d7f3f70138f8fc63fec /src/systems
parent7262cfc53b4af978d6db1b91e3143200f906587f (diff)
more consistent imports
Diffstat (limited to 'src/systems')
-rw-r--r--src/systems/mod.rs30
-rw-r--r--src/systems/moving.rs34
-rw-r--r--src/systems/view.rs12
3 files changed, 44 insertions, 32 deletions
diff --git a/src/systems/mod.rs b/src/systems/mod.rs
index 546669b..88e67ad 100644
--- a/src/systems/mod.rs
+++ b/src/systems/mod.rs
@@ -1,10 +1,22 @@
-pub mod controlinput;
-pub mod registernew;
-pub mod moving;
-pub mod view;
-pub mod remove;
-pub mod create;
-pub mod take;
-pub mod migrate;
-pub mod useitem;
+mod controlinput;
+mod registernew;
+mod moving;
+mod view;
+mod remove;
+mod create;
+mod take;
+mod migrate;
+mod useitem;
+
+pub use self::{
+ controlinput::ControlInput,
+ registernew::RegisterNew,
+ moving::Move,
+ view::View,
+ remove::Remove,
+ create::Create,
+ take::Take,
+ migrate::Migrate,
+ useitem::Use
+};
diff --git a/src/systems/moving.rs b/src/systems/moving.rs
index f5c1b4a..ccd9455 100644
--- a/src/systems/moving.rs
+++ b/src/systems/moving.rs
@@ -11,26 +11,24 @@ use specs::{
Write
};
-use crate::pos::Pos;
-
-use crate::components::{
- Controller,
- Blocking,
- Position,
- Floor,
- Moved
-};
-
-use crate::controls::{
- Control
+use crate::{
+ Pos,
+ components::{
+ Controller,
+ Blocking,
+ Position,
+ Floor,
+ Moved
+ },
+ controls::{
+ Control
+ },
+ resources::{
+ Size,
+ Ground
+ },
};
-use crate::resources::{
- Size,
- Ground
-};
-
-
pub struct Move;
impl <'a> System<'a> for Move {
diff --git a/src/systems/view.rs b/src/systems/view.rs
index 7d41820..158a187 100644
--- a/src/systems/view.rs
+++ b/src/systems/view.rs
@@ -10,11 +10,13 @@ use specs::{
Entities
};
-use crate::{Pos, Sprite};
-use crate::components::{Visible, Player, Position, Inventory, New, Moved, Removed, Health};
-use crate::resources::{Size, Output, Ground};
-use crate::worldmessages::{WorldMessage, FieldMessage};
-
+use crate::{
+ Pos,
+ Sprite,
+ components::{Visible, Player, Position, Inventory, New, Moved, Removed, Health},
+ resources::{Size, Output, Ground},
+ worldmessages::{WorldMessage, FieldMessage}
+};
#[derive(Default)]
pub struct View;