|
|
@ -17,10 +17,10 @@ use crate::ship::drops::ItemDropType; |
|
|
|
pub struct ItemEntityId(pub u32);
|
|
|
|
#[derive(Hash, PartialEq, Eq, Debug, Clone)]
|
|
|
|
pub struct ItemId(u32);
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
|
|
|
|
pub struct BankName(pub String);
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq)]
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
|
|
pub enum ItemLocation {
|
|
|
|
Inventory {
|
|
|
|
character_id: CharacterEntityId,
|
|
|
@ -167,7 +167,7 @@ pub struct NewItemEntity { |
|
|
|
pub item: ItemDetail,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq)]
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
|
|
pub struct ItemEntity {
|
|
|
|
pub id: ItemEntityId,
|
|
|
|
pub location: ItemLocation,
|
|
|
@ -175,7 +175,7 @@ pub struct ItemEntity { |
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
|
|
pub enum InventoryItemEntity {
|
|
|
|
Individual(ItemEntity),
|
|
|
|
Stacked(Vec<ItemEntity>),
|
|
|
|