|
|
@ -62,6 +62,7 @@ pub enum ShipError { |
|
|
|
PickUpInvalidItemId(u32),
|
|
|
|
DropInvalidItemId(u32),
|
|
|
|
ItemManagerError(#[from] items::ItemManagerError),
|
|
|
|
ItemStateError(#[from] items::state::ItemStateError),
|
|
|
|
#[error("")]
|
|
|
|
ItemDropLocationNotSet,
|
|
|
|
BoxAlreadyDroppedItem(ClientId, u16),
|
|
|
@ -404,6 +405,7 @@ impl<EG: EntityGateway> ShipServerStateBuilder<EG> { |
|
|
|
level_table: CharacterLevelTable::default(),
|
|
|
|
name: self.name.unwrap_or_else(|| "NAMENOTSET".into()),
|
|
|
|
item_manager: items::ItemManager::default(),
|
|
|
|
item_state: items::state::ItemState::default(),
|
|
|
|
ip: self.ip.unwrap_or_else(|| Ipv4Addr::new(127,0,0,1)),
|
|
|
|
port: self.port.unwrap_or(SHIP_PORT),
|
|
|
|
shops: Box::new(ItemShops::default()),
|
|
|
@ -448,6 +450,7 @@ pub struct ShipServerState<EG: EntityGateway> { |
|
|
|
level_table: CharacterLevelTable,
|
|
|
|
name: String,
|
|
|
|
item_manager: items::ItemManager,
|
|
|
|
item_state: items::state::ItemState,
|
|
|
|
shops: Box<ItemShops>,
|
|
|
|
pub blocks: Blocks,
|
|
|
|
|
|
|
|