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