aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-01-29 18:11:53 +0000
committerJustin Clark-Casey (justincc)2010-01-29 18:11:53 +0000
commitae2174d8f526b225c3cccf551f1a9f01d6569203 (patch)
treec1c6ebd0ae5a51ad404b74e07019a459f42b1064 /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
parentResolve one more conflict I overlooked (diff)
downloadopensim-SC_OLD-ae2174d8f526b225c3cccf551f1a9f01d6569203.zip
opensim-SC_OLD-ae2174d8f526b225c3cccf551f1a9f01d6569203.tar.gz
opensim-SC_OLD-ae2174d8f526b225c3cccf551f1a9f01d6569203.tar.bz2
opensim-SC_OLD-ae2174d8f526b225c3cccf551f1a9f01d6569203.tar.xz
Add method to get all items with the same name from a particular prim
Extend load oar test to check loading of a sound item
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 5f13278..b37e1a2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -554,8 +554,32 @@ namespace OpenSim.Region.Framework.Scenes
554 m_items.TryGetValue(itemId, out item); 554 m_items.TryGetValue(itemId, out item);
555 555
556 return item; 556 return item;
557 } 557 }
558
559 /// <summary>
560 /// Get inventory items by name.
561 /// </summary>
562 /// <param name="name"></param>
563 /// <returns>
564 /// A list of inventory items with that name.
565 /// If no inventory item has that name then an empty list is returned.
566 /// </returns>
567 public IList<TaskInventoryItem> GetInventoryItems(string name)
568 {
569 IList<TaskInventoryItem> items = new List<TaskInventoryItem>();
558 570
571 lock (m_items)
572 {
573 foreach (TaskInventoryItem item in m_items.Values)
574 {
575 if (item.Name == name)
576 items.Add(item);
577 }
578 }
579
580 return items;
581 }
582
559 /// <summary> 583 /// <summary>
560 /// Update an existing inventory item. 584 /// Update an existing inventory item.
561 /// </summary> 585 /// </summary>