diff --git a/rpg_components/src/items/ability_book.rs b/rpg_components/src/items/ability_book.rs index f0a7dee..ce740e5 100644 --- a/rpg_components/src/items/ability_book.rs +++ b/rpg_components/src/items/ability_book.rs @@ -20,7 +20,7 @@ use super::{ }; pub trait Ability: Send + Sync + Clone + Default { - fn create(asset_path: impl Into) -> Result; + fn create(engine: &Engine, asset_path: impl Into) -> Result; fn name(&self) -> &str; fn icon_path(&self) -> &AssetPath; diff --git a/rpg_components/src/items/item_system.rs b/rpg_components/src/items/item_system.rs index 9aa597c..bea55d7 100644 --- a/rpg_components/src/items/item_system.rs +++ b/rpg_components/src/items/item_system.rs @@ -64,7 +64,7 @@ impl ItemSystem { let abilities = search_dir_recursively(&ability_directory.full_path(), ".abil")? .into_iter() - .map(|path| A::create(path)) + .map(|path| A::create(engine, path)) .collect::>>()?; let (