Adds todo
Build Failed The build failed
Gitea/epoch_forge/pipeline/head There was a failure building this commit Details

This commit is contained in:
Dandaedre 2025-12-09 19:26:25 +01:00
parent 3c03bd01ed
commit b454e65d5d
2 changed files with 5 additions and 3 deletions

View File

@ -206,7 +206,9 @@ fn handle_create_entity(
// TODO: Create real entity
let _ = entity_args;
let e = Entity::default();
// TODO: Add name, add stats repartition to clap
// TODO: Load stats to entity from clap
let e = Entity::create_rng(e_type, &RngLevel::Flawed)?;
let message = &crate::success::SuccessMessages::CreatedEntity(
e.name.clone(),

View File

@ -132,7 +132,7 @@ impl Entity {
}
/// Create an entity using Special Rng Levels
pub fn create_rng(e_type: EntityType, rng: &RngLevel) -> Result<Self, EpochError> {
pub fn create_rng(e_type: &EntityType, rng: &RngLevel) -> Result<Self, EpochError> {
let mut r = rand::rng();
Ok(Self {
id: Uuid::new_v4(),
@ -143,7 +143,7 @@ impl Entity {
position: Position::create_rng(&mut r)?,
..Default::default()
},
entity_type: e_type,
entity_type: e_type.clone(),
..Default::default()
})
}