You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
383 B

4 years ago
4 years ago
4 years ago
  1. mod weapon;
  2. mod tool;
  3. mod armor;
  4. use crate::entity::item::ItemDetail;
  5. pub trait ShopItem {
  6. fn price(&self) -> usize;
  7. fn as_bytes(&self) -> [u8; 12];
  8. fn as_item(&self) -> ItemDetail;
  9. }
  10. pub enum ShopType {
  11. Weapon,
  12. Tool,
  13. Armor
  14. }
  15. pub use weapon::{WeaponShop, WeaponShopItem};
  16. pub use tool::{ToolShop, ToolShopItem};
  17. pub use armor::{ArmorShop, ArmorShopItem};