|
@ -220,6 +220,20 @@ impl InventoryItem { |
|
|
_ => None
|
|
|
_ => None
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn stacked(&self) -> Option<&StackedInventoryItem> {
|
|
|
|
|
|
match self {
|
|
|
|
|
|
InventoryItem::Stacked(ref stacked_inventory_item) => Some(stacked_inventory_item),
|
|
|
|
|
|
_ => None
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn mag(&self) -> Option<&Mag> {
|
|
|
|
|
|
match self {
|
|
|
|
|
|
InventoryItem::Individual(individual_inventory_item) => individual_inventory_item.mag(),
|
|
|
|
|
|
_ => None
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|