From b56add981c2f520789b97d1ee6f71dae41e8c900 Mon Sep 17 00:00:00 2001 From: troido Date: Sat, 8 Feb 2020 19:22:00 +0100 Subject: no templates in the world; only pre-entities --- src/systems/controlinput.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/systems/controlinput.rs') diff --git a/src/systems/controlinput.rs b/src/systems/controlinput.rs index 0771b1e..712c98b 100644 --- a/src/systems/controlinput.rs +++ b/src/systems/controlinput.rs @@ -14,11 +14,7 @@ use specs::{ use crate::components::{Controller, Player, Removed}; use crate::controls::{Control, Action}; use crate::resources::{Input, NewEntities, Spawn}; -use crate::hashmap; -use crate::template::Template; -use crate::parameter::Parameter; -// use crate::assemblages::Player; pub struct ControlInput; @@ -48,9 +44,9 @@ impl <'a> System<'a> for ControlInput { for action in &input.actions { match action { Action::Join(name) => { - new.templates.push(( + new.ents.push(( spawn.pos, - Template::new("player", hashmap!("name".to_string() => Parameter::String(name.to_string()))) + crate::player::make_player(name) )); } Action::Leave(name) => {leaving.insert(name);} -- cgit