redo this cause entitygateway isnt Clone anymore
This commit is contained in:
		
							parent
							
								
									cbb5c1fffd
								
							
						
					
					
						commit
						bc702375d2
					
				| @ -257,34 +257,37 @@ async fn new_character<EG: EntityGateway>(entity_gateway: &mut EG, user: &UserAc | ||||
|         character_id: character.id, | ||||
|     }).await?; | ||||
| 
 | ||||
|     let (monomates, monofluids) = futures::future::join_all((0..4usize).map(|_| { | ||||
|         let mut eg = entity_gateway.clone(); | ||||
|         let character_id = character.id; | ||||
|         async move { | ||||
|             let monomate = eg.create_item( | ||||
|                 NewItemEntity { | ||||
|                     item: ItemDetail::Tool ( | ||||
|                         Tool { | ||||
|                             tool: item::tool::ToolType::Monomate, | ||||
|                         })}).await?; | ||||
|     let mut monomates = Vec::new(); | ||||
|     for _ in 0..4usize { | ||||
|         let monomate = entity_gateway.create_item( | ||||
|             NewItemEntity { | ||||
|                 item: ItemDetail::Tool ( | ||||
|                     Tool { | ||||
|                         tool: item::tool::ToolType::Monomate, | ||||
|                     })}).await?; | ||||
| 
 | ||||
|             eg.add_item_note(&monomate.id, ItemNote::CharacterCreation { | ||||
|                 character_id | ||||
|             }).await?; | ||||
|         entity_gateway.add_item_note(&monomate.id, ItemNote::CharacterCreation { | ||||
|             character_id: character.id | ||||
|         }).await?; | ||||
| 
 | ||||
|             let monofluid = eg.create_item( | ||||
|                 NewItemEntity { | ||||
|                     item: ItemDetail::Tool ( | ||||
|                         Tool { | ||||
|                             tool: item::tool::ToolType::Monofluid, | ||||
|                         })}).await?; | ||||
|         monomates.push(monomate); | ||||
|     } | ||||
| 
 | ||||
|             eg.add_item_note(&monofluid.id, ItemNote::CharacterCreation { | ||||
|                 character_id | ||||
|             }).await?; | ||||
|     let mut monofluids = Vec::new(); | ||||
|     for _ in 0..4usize { | ||||
|         let monofluid = entity_gateway.create_item( | ||||
|             NewItemEntity { | ||||
|                 item: ItemDetail::Tool ( | ||||
|                     Tool { | ||||
|                         tool: item::tool::ToolType::Monofluid, | ||||
|                     })}).await?; | ||||
| 
 | ||||
|             Ok((monomate, monofluid)) | ||||
|         }})).await.into_iter().collect::<Result<Vec<_>, GatewayError>>()?.into_iter().unzip(); | ||||
|         entity_gateway.add_item_note(&monofluid.id, ItemNote::CharacterCreation { | ||||
|             character_id: character.id | ||||
|         }).await?; | ||||
| 
 | ||||
|         monofluids.push(monofluid); | ||||
|     } | ||||
| 
 | ||||
|     let inventory = InventoryEntity { | ||||
|         items: vec![InventoryItemEntity::Individual(weapon.clone()), InventoryItemEntity::Individual(armor.clone()), InventoryItemEntity::Individual(mag.clone()), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user