diff options
| author | troido <troido@protonmail.com> | 2020-02-09 18:53:27 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-09 18:53:27 +0100 |
| commit | 105c5ab0c0e969f3fda2cd43ae5195cbdb4da016 (patch) | |
| tree | 46b65b3e96d9b180bf6658cb968a149eb3cfde0f /src/encyclopedia.rs | |
| parent | b1da31499de4145b1f77296cbea0c637e6f866bf (diff) | |
Revert "no templates in the world; only pre-entities"
This reverts commit b56add981c2f520789b97d1ee6f71dae41e8c900.
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 6851a06..5cdf90c 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::PreEntity; +use crate::componentwrapper::ComponentWrapper; use crate::template::Template; #[derive(Default, Clone)] @@ -20,7 +20,7 @@ impl Encyclopedia { Ok(Encyclopedia{items}) } - pub fn construct(&self, template: &Template) -> Result<PreEntity, &'static str> { + pub fn construct(&self, template: &Template) -> Result<Vec<ComponentWrapper>, &'static str> { let assemblage = self.items.get(&template.name).ok_or("unknown assemblage name")?; assemblage.instantiate(&template.args, &template.kwargs) } |
