summaryrefslogtreecommitdiff
path: root/src/room.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/room.rs')
-rw-r--r--src/room.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/room.rs b/src/room.rs
index da92d69..8341eba 100644
--- a/src/room.rs
+++ b/src/room.rs
@@ -12,6 +12,7 @@ use specs::{
use super::controls::Action;
use super::pos::Pos;
+use super::components::Position;
use super::assemblages::Assemblage;
use super::worldmessages::WorldMessage;
use super::resources::{
@@ -49,7 +50,7 @@ impl <'a, 'b>Room<'a, 'b> {
.with(MakeFloor, "makefloor", &[])
.with(Move, "move", &["makefloor", "controlinput"])
.with(ClearControllers, "clearcontrollers", &["move"])
- .with(View, "view", &["move"])
+ .with(View::default(), "view", &["move"])
.build();
dispatcher.setup(&mut world);
@@ -69,7 +70,7 @@ impl <'a, 'b>Room<'a, 'b> {
let assemblages = self.world.remove::<NewEntities>().unwrap_or(NewEntities{assemblages: Vec::new()}).assemblages;
self.world.insert(NewEntities{assemblages: Vec::new()});
for (pos, assemblage) in assemblages{
- assemblage.build(self.world.create_entity()).with(pos).build();
+ assemblage.build(self.world.create_entity()).with(Position::new(pos)).build();
}
self.world.maintain();
}
@@ -84,7 +85,7 @@ impl <'a, 'b>Room<'a, 'b> {
}
pub fn add_obj(&mut self, template: &dyn Assemblage, (x, y): (i32, i32)) -> Entity {
- template.build(self.world.create_entity()).with(Pos{x, y}).build()
+ template.build(self.world.create_entity()).with(Position::new(Pos{x, y})).build()
}
}