diff options
| author | troido <troido@protonmail.com> | 2020-02-08 19:22:00 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-08 19:22:00 +0100 |
| commit | b56add981c2f520789b97d1ee6f71dae41e8c900 (patch) | |
| tree | dca7d8795c2a51f56173153c286c4dadcf8daff4 /src/systems/create.rs | |
| parent | 3ebe9e6f792a0457c6f3b37b6e9d92c83f8694e2 (diff) | |
no templates in the world; only pre-entities
Diffstat (limited to 'src/systems/create.rs')
| -rw-r--r-- | src/systems/create.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/systems/create.rs b/src/systems/create.rs index 35ef747..054dc1f 100644 --- a/src/systems/create.rs +++ b/src/systems/create.rs @@ -34,18 +34,13 @@ impl <'a> System<'a> for Create { new.remove(ent); } } - for (pos, template) in &new_entities.templates { + for (pos, comps) in &new_entities.ents { let mut builder = updater.create_entity(&entities); - match new_entities.encyclopedia.construct(template) { - Ok(comps) => { - for comp in comps { - builder = comp.build(builder); - } - builder.with(Position::new(*pos)).with(New).build(); - }, - Err(msg) => {println!("{}", msg);} + for comp in comps { + builder = comp.build(builder); } + builder.with(Position::new(*pos)).with(New).build(); } - new_entities.templates.clear(); + new_entities.ents.clear(); } } |
