Return object on save game load
This commit is contained in:
parent
1087e66617
commit
e5fc772288
1 changed files with 2 additions and 2 deletions
|
@ -362,7 +362,7 @@ impl SaveGame {
|
||||||
pub fn to_entity_object<A: Ability + 'static>(
|
pub fn to_entity_object<A: Ability + 'static>(
|
||||||
self,
|
self,
|
||||||
world: &mut World,
|
world: &mut World,
|
||||||
) -> Result<(Entity, String)> {
|
) -> Result<(EntityObject, String)> {
|
||||||
let mut entity_object = AssetHandler::create(world).empty_entity();
|
let mut entity_object = AssetHandler::create(world).empty_entity();
|
||||||
|
|
||||||
entity_object.insert_component(Draw::new(Vec::new()));
|
entity_object.insert_component(Draw::new(Vec::new()));
|
||||||
|
@ -397,6 +397,6 @@ impl SaveGame {
|
||||||
entity_object.insert_component(statistics);
|
entity_object.insert_component(statistics);
|
||||||
entity_object.insert_component(current_status);
|
entity_object.insert_component(current_status);
|
||||||
|
|
||||||
Ok((world.add_entity(entity_object)?, self.general.name))
|
Ok((entity_object, self.general.name))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue