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