aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-14 17:24:56 +0000
committerMelanie Thielker2008-11-14 17:24:56 +0000
commitedee11ff8750d452f012690c556384984795f4be (patch)
tree21738d6ee71f00dea792585ab25557c64e571dca /OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
parent* Switch default permissions back to false (so they are not on) as they were ... (diff)
downloadopensim-SC-edee11ff8750d452f012690c556384984795f4be.zip
opensim-SC-edee11ff8750d452f012690c556384984795f4be.tar.gz
opensim-SC-edee11ff8750d452f012690c556384984795f4be.tar.bz2
opensim-SC-edee11ff8750d452f012690c556384984795f4be.tar.xz
Reapplying a revised version of Christopher Yeoh's (IBM) patch for allow
inventory drop. Also adds a new flags, "propagate_permissions" to OpenSim.ini to control that feature.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs19
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 501f199..073bccf 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -289,16 +289,16 @@ namespace OpenSim.Region.Environment.Scenes
289 /// name is chosen. 289 /// name is chosen.
290 /// </summary> 290 /// </summary>
291 /// <param name="item"></param> 291 /// <param name="item"></param>
292 public void AddInventoryItem(TaskInventoryItem item) 292 public void AddInventoryItem(TaskInventoryItem item, bool allowedDrop)
293 { 293 {
294 AddInventoryItem(item.Name, item); 294 AddInventoryItem(item.Name, item, allowedDrop);
295 } 295 }
296 296
297 /// <summary> 297 /// <summary>
298 /// Add an item to this prim's inventory. If an item with the same name already exists, it is replaced. 298 /// Add an item to this prim's inventory. If an item with the same name already exists, it is replaced.
299 /// </summary> 299 /// </summary>
300 /// <param name="item"></param> 300 /// <param name="item"></param>
301 public void AddInventoryItemExclusive(TaskInventoryItem item) 301 public void AddInventoryItemExclusive(TaskInventoryItem item, bool allowedDrop)
302 { 302 {
303 List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values); 303 List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values);
304 foreach (TaskInventoryItem i in il) 304 foreach (TaskInventoryItem i in il)
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes
313 } 313 }
314 } 314 }
315 315
316 AddInventoryItem(item.Name, item); 316 AddInventoryItem(item.Name, item, allowedDrop);
317 } 317 }
318 318
319 /// <summary> 319 /// <summary>
@@ -324,7 +324,10 @@ namespace OpenSim.Region.Environment.Scenes
324 /// The item itself. The name within this structure is ignored in favour of the name 324 /// The item itself. The name within this structure is ignored in favour of the name
325 /// given in this method's arguments 325 /// given in this method's arguments
326 /// </param> 326 /// </param>
327 protected void AddInventoryItem(string name, TaskInventoryItem item) 327 /// <param name="allowedDrop">
328 /// Item was only added to inventory because AllowedDrop is set
329 /// </param>
330 protected void AddInventoryItem(string name, TaskInventoryItem item, bool allowedDrop)
328 { 331 {
329 name = FindAvailableInventoryName(name); 332 name = FindAvailableInventoryName(name);
330 if (name == String.Empty) 333 if (name == String.Empty)
@@ -337,7 +340,11 @@ namespace OpenSim.Region.Environment.Scenes
337 lock (m_taskInventory) 340 lock (m_taskInventory)
338 { 341 {
339 m_taskInventory.Add(item.ItemID, item); 342 m_taskInventory.Add(item.ItemID, item);
340 TriggerScriptChangedEvent(Changed.INVENTORY); 343
344 if (allowedDrop)
345 TriggerScriptChangedEvent(Changed.ALLOWED_DROP);
346 else
347 TriggerScriptChangedEvent(Changed.INVENTORY);
341 } 348 }
342 349
343 m_inventorySerial++; 350 m_inventorySerial++;