From c71ecb48fa4368035a852e2d06869a21382a6876 Mon Sep 17 00:00:00 2001 From: troido Date: Tue, 18 Feb 2020 01:11:49 +0100 Subject: Players are now saved/loaded too --- src/componentwrapper.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/componentwrapper.rs') diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 951745d..e5f9b9f 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use specs::{Builder, world::LazyBuilder}; +use specs::Builder; use crate::PlayerId; use crate::components::{Visible, Blocking, Player, Floor, Item, Inventory, Health, Serialise}; @@ -20,7 +20,7 @@ macro_rules! components { impl ComponentWrapper { - pub fn build<'a>(&self, builder: LazyBuilder<'a>) -> LazyBuilder<'a> { + pub fn build(&self, builder: A ) -> A { match self.clone() { $( Self::$comp(c) => builder.with(c), @@ -101,7 +101,7 @@ components!( ); - +pub type PreEntity = Vec; -- cgit