|
|
@ -408,9 +408,13 @@ impl CharacterInventory { |
|
|
|
let (slot, _) = self.items.iter()
|
|
|
|
.enumerate()
|
|
|
|
.filter(|(_, item)| {
|
|
|
|
if let InventoryItem::Individual(individual_inventory_item) = item {if let ItemDetail::Mag(_) = &individual_inventory_item.item {return individual_inventory_item.equipped }}
|
|
|
|
if let InventoryItem::Individual(individual_inventory_item) = item {
|
|
|
|
if let ItemDetail::Mag(_) = &individual_inventory_item.item {
|
|
|
|
return individual_inventory_item.equipped
|
|
|
|
}
|
|
|
|
}
|
|
|
|
false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.nth(0)?;
|
|
|
|
Some(InventoryItemHandle {
|
|
|
|
inventory: self,
|
|
|
@ -440,9 +444,13 @@ impl CharacterInventory { |
|
|
|
let (slot, _) = self.items.iter()
|
|
|
|
.enumerate()
|
|
|
|
.filter(|(_, item)| {
|
|
|
|
if let InventoryItem::Individual(individual_inventory_item) = item {if let ItemDetail::Shield(_) = &individual_inventory_item.item {return individual_inventory_item.equipped }}
|
|
|
|
if let InventoryItem::Individual(individual_inventory_item) = item {
|
|
|
|
if let ItemDetail::Shield(_) = &individual_inventory_item.item {
|
|
|
|
return individual_inventory_item.equipped
|
|
|
|
}
|
|
|
|
}
|
|
|
|
false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.nth(0)?;
|
|
|
|
Some(InventoryItemHandle {
|
|
|
|
inventory: self,
|
|
|
@ -454,9 +462,13 @@ impl CharacterInventory { |
|
|
|
let (slot, _) = self.items.iter()
|
|
|
|
.enumerate()
|
|
|
|
.filter(|(_, item)| {
|
|
|
|
if let InventoryItem::Individual(individual_inventory_item) = item {if let ItemDetail::Weapon(_) = &individual_inventory_item.item {return individual_inventory_item.equipped }}
|
|
|
|
if let InventoryItem::Individual(individual_inventory_item) = item {
|
|
|
|
if let ItemDetail::Weapon(_) = &individual_inventory_item.item {
|
|
|
|
return individual_inventory_item.equipped
|
|
|
|
}
|
|
|
|
}
|
|
|
|
false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.nth(0)?;
|
|
|
|
Some(InventoryItemHandle {
|
|
|
|
inventory: self,
|
|
|
|