Implement native inventory manager workflows (#62)
This commit is contained in:
@@ -1462,6 +1462,16 @@ impl Inventory {
|
||||
.and_then(|value| value.clone_as::<T>()))
|
||||
}
|
||||
|
||||
/// Returns the shared item portion regardless of the concrete inventory
|
||||
/// subclass stored for the UUID.
|
||||
pub(crate) fn native_item_value(&self, uuid: UUID) -> Option<InventoryItem> {
|
||||
read(&self.inner.state)
|
||||
.items
|
||||
.get(&uuid)
|
||||
.and_then(InventoryNode::value)
|
||||
.and_then(|value| value.item().cloned())
|
||||
}
|
||||
|
||||
pub fn try_get_value_with_uuid_inventory_base(
|
||||
&self,
|
||||
uuid: UUID,
|
||||
|
||||
Reference in New Issue
Block a user