add item_state to ShipState
This commit is contained in:
		
							parent
							
								
									12fd799278
								
							
						
					
					
						commit
						11bc777a51
					
				
							
								
								
									
										21
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										21
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @ -597,6 +597,7 @@ dependencies = [ | ||||
|  "derive_more", | ||||
|  "enum-utils", | ||||
|  "fern", | ||||
|  "fix-hidden-lifetime-bug", | ||||
|  "futures", | ||||
|  "lazy_static", | ||||
|  "libpso", | ||||
| @ -679,6 +680,26 @@ dependencies = [ | ||||
|  "log", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "fix-hidden-lifetime-bug" | ||||
| version = "0.2.5" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d4ae9c2016a663983d4e40a9ff967d6dcac59819672f0b47f2b17574e99c33c8" | ||||
| dependencies = [ | ||||
|  "fix-hidden-lifetime-bug-proc_macros", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "fix-hidden-lifetime-bug-proc_macros" | ||||
| version = "0.2.5" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "e4c81935e123ab0741c4c4f0d9b8377e5fb21d3de7e062fa4b1263b1fbcba1ea" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  "syn", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "foreign-types" | ||||
| version = "0.3.2" | ||||
|  | ||||
| @ -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, | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user