use std::sync::Arc; use anyhow::Result; use engine::prelude::*; use crate::components::inventory::Storable; use super::{ability_book::Ability, ItemSystem, Rarities}; #[derive(Clone)] pub struct MapItem { rarity: Rarities, icon: Arc, } impl MapItem { pub fn into_persistent(&self) -> String { String::new() } pub fn from_persistent<'a, A: Ability>( mut _split: impl Iterator, _item_system: &ItemSystem, ) -> Result { todo!() } pub fn create_tooltip( &self, _gui_handler: &Arc, _position: (i32, i32), ) -> Result> { todo!() } } impl Storable for MapItem { fn rarity(&self) -> Rarities { self.rarity } fn icon(&self) -> Arc { self.icon.clone() } }