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/encyclopedia.rs | |
| parent | 3ebe9e6f792a0457c6f3b37b6e9d92c83f8694e2 (diff) | |
no templates in the world; only pre-entities
Diffstat (limited to 'src/encyclopedia.rs')
| -rw-r--r-- | src/encyclopedia.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/encyclopedia.rs b/src/encyclopedia.rs index 5cdf90c..6851a06 100644 --- a/src/encyclopedia.rs +++ b/src/encyclopedia.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use serde_json::Value; use crate::assemblage::Assemblage; -use crate::componentwrapper::ComponentWrapper; +use crate::componentwrapper::PreEntity; use crate::template::Template; #[derive(Default, Clone)] @@ -20,7 +20,7 @@ impl Encyclopedia { Ok(Encyclopedia{items}) } - pub fn construct(&self, template: &Template) -> Result<Vec<ComponentWrapper>, &'static str> { + pub fn construct(&self, template: &Template) -> Result<PreEntity, &'static str> { let assemblage = self.items.get(&template.name).ok_or("unknown assemblage name")?; assemblage.instantiate(&template.args, &template.kwargs) } |
