22 lines
383 B
Rust
Raw Normal View History

2020-09-27 18:16:27 -06:00
mod weapon;
mod tool;
mod armor;
use crate::entity::item::ItemDetail;
2020-09-23 19:14:11 -06:00
pub trait ShopItem {
fn price(&self) -> usize;
2020-09-27 18:16:27 -06:00
fn as_bytes(&self) -> [u8; 12];
fn as_item(&self) -> ItemDetail;
}
pub enum ShopType {
Weapon,
Tool,
Armor
2020-09-23 19:14:11 -06:00
}
2020-09-27 18:16:27 -06:00
pub use weapon::{WeaponShop, WeaponShopItem};
pub use tool::{ToolShop, ToolShopItem};
pub use armor::{ArmorShop, ArmorShopItem};