diff --git a/rpg_components/src/config/save_game.rs b/rpg_components/src/config/save_game.rs index 02bdb67..b3167e5 100644 --- a/rpg_components/src/config/save_game.rs +++ b/rpg_components/src/config/save_game.rs @@ -362,7 +362,7 @@ impl SaveGame { pub fn to_entity_object( self, world: &mut World, - ) -> Result<(Entity, String)> { + ) -> Result<(EntityObject, String)> { let mut entity_object = AssetHandler::create(world).empty_entity(); entity_object.insert_component(Draw::new(Vec::new())); @@ -397,6 +397,6 @@ impl SaveGame { entity_object.insert_component(statistics); entity_object.insert_component(current_status); - Ok((world.add_entity(entity_object)?, self.general.name)) + Ok((entity_object, self.general.name)) } }