Return object on save game load

This commit is contained in:
hodasemi 2025-03-06 11:36:17 +01:00
parent 1087e66617
commit e5fc772288

View file

@ -362,7 +362,7 @@ impl SaveGame {
pub fn to_entity_object<A: Ability + 'static>(
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))
}
}