InventoryItem::{stacked, mag}
This commit is contained in:
parent
dbb1105741
commit
296d1cc0ea
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user