aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs58
1 files changed, 29 insertions, 29 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 5b64aac..a50f162 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes
55 private object m_inventoryFileLock = new object(); 55 private object m_inventoryFileLock = new object();
56 56
57 private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>(); 57 private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>();
58 58
59 /// <value> 59 /// <value>
60 /// The part to which the inventory belongs. 60 /// The part to which the inventory belongs.
61 /// </value> 61 /// </value>
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Scenes
76 /// Tracks whether inventory has changed since the last persistent backup 76 /// Tracks whether inventory has changed since the last persistent backup
77 /// </summary> 77 /// </summary>
78 internal bool HasInventoryChanged; 78 internal bool HasInventoryChanged;
79 79
80 /// <value> 80 /// <value>
81 /// Inventory serial number 81 /// Inventory serial number
82 /// </value> 82 /// </value>
@@ -91,8 +91,8 @@ namespace OpenSim.Region.Framework.Scenes
91 /// </value> 91 /// </value>
92 protected internal TaskInventoryDictionary Items 92 protected internal TaskInventoryDictionary Items
93 { 93 {
94 get { 94 get {
95 return m_items; 95 return m_items;
96 } 96 }
97 set 97 set
98 { 98 {
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Framework.Scenes
110 return m_items.Count; 110 return m_items.Count;
111 } 111 }
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// Constructor 115 /// Constructor
116 /// </summary> 116 /// </summary>
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Framework.Scenes
393 StoreScriptError(item.ItemID, msg); 393 StoreScriptError(item.ItemID, msg);
394 m_log.ErrorFormat( 394 m_log.ErrorFormat(
395 "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", 395 "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
396 item.Name, item.ItemID, m_part.AbsolutePosition, 396 item.Name, item.ItemID, m_part.AbsolutePosition,
397 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); 397 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
398 398
399 return false; 399 return false;
@@ -410,7 +410,7 @@ namespace OpenSim.Region.Framework.Scenes
410 m_items[item.ItemID].PermsGranter = UUID.Zero; 410 m_items[item.ItemID].PermsGranter = UUID.Zero;
411 411
412 m_items.LockItemsForWrite(false); 412 m_items.LockItemsForWrite(false);
413 413
414 string script = Utils.BytesToString(asset.Data); 414 string script = Utils.BytesToString(asset.Data);
415 m_part.ParentGroup.Scene.EventManager.TriggerRezScript( 415 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
416 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); 416 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
@@ -428,7 +428,7 @@ namespace OpenSim.Region.Framework.Scenes
428 private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID) 428 private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID)
429 { 429 {
430// m_log.DebugFormat( 430// m_log.DebugFormat(
431// "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}", 431// "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}",
432// newID, oldID, loadedID); 432// newID, oldID, loadedID);
433 433
434 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 434 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
@@ -477,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes
477 477
478 m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml; 478 m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml;
479 } 479 }
480 480
481 foreach (IScriptModule e in engines) 481 foreach (IScriptModule e in engines)
482 { 482 {
483 if (e != null) 483 if (e != null)
@@ -544,7 +544,7 @@ namespace OpenSim.Region.Framework.Scenes
544 { 544 {
545 ArrayList errors; 545 ArrayList errors;
546 546
547 // Indicate to CreateScriptInstanceInternal() we want it to 547 // Indicate to CreateScriptInstanceInternal() we want it to
548 // post any compilation/loading error messages 548 // post any compilation/loading error messages
549 lock (m_scriptErrors) 549 lock (m_scriptErrors)
550 { 550 {
@@ -641,7 +641,7 @@ namespace OpenSim.Region.Framework.Scenes
641 { 641 {
642 if (!sceneObjectBeingDeleted) 642 if (!sceneObjectBeingDeleted)
643 m_part.RemoveScriptEvents(itemId); 643 m_part.RemoveScriptEvents(itemId);
644 644
645 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId); 645 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId);
646 m_part.ParentGroup.AddActiveScriptCount(-1); 646 m_part.ParentGroup.AddActiveScriptCount(-1);
647 } 647 }
@@ -650,7 +650,7 @@ namespace OpenSim.Region.Framework.Scenes
650 m_log.WarnFormat( 650 m_log.WarnFormat(
651 "[PRIM INVENTORY]: " + 651 "[PRIM INVENTORY]: " +
652 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", 652 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
653 itemId, m_part.Name, m_part.UUID, 653 itemId, m_part.Name, m_part.UUID,
654 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 654 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
655 } 655 }
656 } 656 }
@@ -679,7 +679,7 @@ namespace OpenSim.Region.Framework.Scenes
679 m_log.WarnFormat( 679 m_log.WarnFormat(
680 "[PRIM INVENTORY]: " + 680 "[PRIM INVENTORY]: " +
681 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", 681 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
682 itemId, m_part.Name, m_part.UUID, 682 itemId, m_part.Name, m_part.UUID,
683 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 683 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
684 } 684 }
685 } 685 }
@@ -802,11 +802,11 @@ namespace OpenSim.Region.Framework.Scenes
802 m_items.LockItemsForWrite(true); 802 m_items.LockItemsForWrite(true);
803 m_items.Add(item.ItemID, item); 803 m_items.Add(item.ItemID, item);
804 m_items.LockItemsForWrite(false); 804 m_items.LockItemsForWrite(false);
805 if (allowedDrop) 805 if (allowedDrop)
806 m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); 806 m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP);
807 else 807 else
808 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 808 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
809 809
810 m_inventorySerial++; 810 m_inventorySerial++;
811 //m_inventorySerial += 2; 811 //m_inventorySerial += 2;
812 HasInventoryChanged = true; 812 HasInventoryChanged = true;
@@ -887,7 +887,7 @@ namespace OpenSim.Region.Framework.Scenes
887 if (null == rezAsset) 887 if (null == rezAsset)
888 { 888 {
889 m_log.WarnFormat( 889 m_log.WarnFormat(
890 "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}", 890 "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}",
891 item.AssetID, item.Name, m_part.Name); 891 item.AssetID, item.Name, m_part.Name);
892 objlist = null; 892 objlist = null;
893 veclist = null; 893 veclist = null;
@@ -895,7 +895,7 @@ namespace OpenSim.Region.Framework.Scenes
895 offsetHeight = 0; 895 offsetHeight = 0;
896 return false; 896 return false;
897 } 897 }
898 898
899 bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight); 899 bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight);
900 900
901 for (int i = 0; i < objlist.Count; i++) 901 for (int i = 0; i < objlist.Count; i++)
@@ -985,7 +985,7 @@ namespace OpenSim.Region.Framework.Scenes
985 985
986 return true; 986 return true;
987 } 987 }
988 988
989 /// <summary> 989 /// <summary>
990 /// Update an existing inventory item. 990 /// Update an existing inventory item.
991 /// </summary> 991 /// </summary>
@@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Framework.Scenes
1009 if (m_items.ContainsKey(item.ItemID)) 1009 if (m_items.ContainsKey(item.ItemID))
1010 { 1010 {
1011// m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name); 1011// m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name);
1012 1012
1013 item.ParentID = m_part.UUID; 1013 item.ParentID = m_part.UUID;
1014 item.ParentPartID = m_part.UUID; 1014 item.ParentPartID = m_part.UUID;
1015 1015
@@ -1025,7 +1025,7 @@ namespace OpenSim.Region.Framework.Scenes
1025 m_inventorySerial++; 1025 m_inventorySerial++;
1026 if (fireScriptEvents) 1026 if (fireScriptEvents)
1027 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 1027 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
1028 1028
1029 if (considerChanged) 1029 if (considerChanged)
1030 { 1030 {
1031 HasInventoryChanged = true; 1031 HasInventoryChanged = true;
@@ -1039,7 +1039,7 @@ namespace OpenSim.Region.Framework.Scenes
1039 m_log.ErrorFormat( 1039 m_log.ErrorFormat(
1040 "[PRIM INVENTORY]: " + 1040 "[PRIM INVENTORY]: " +
1041 "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory", 1041 "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
1042 item.ItemID, m_part.Name, m_part.UUID, 1042 item.ItemID, m_part.Name, m_part.UUID,
1043 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 1043 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
1044 } 1044 }
1045 m_items.LockItemsForWrite(false); 1045 m_items.LockItemsForWrite(false);
@@ -1084,7 +1084,7 @@ namespace OpenSim.Region.Framework.Scenes
1084 } 1084 }
1085 } 1085 }
1086 m_items.LockItemsForRead(false); 1086 m_items.LockItemsForRead(false);
1087 1087
1088 1088
1089 if (scriptcount <= 0) 1089 if (scriptcount <= 0)
1090 { 1090 {
@@ -1381,7 +1381,7 @@ namespace OpenSim.Region.Framework.Scenes
1381 item.CurrentPermissions = perms; 1381 item.CurrentPermissions = perms;
1382 item.BasePermissions = perms; 1382 item.BasePermissions = perms;
1383 } 1383 }
1384 1384
1385 m_inventorySerial++; 1385 m_inventorySerial++;
1386 HasInventoryChanged = true; 1386 HasInventoryChanged = true;
1387 } 1387 }
@@ -1485,7 +1485,7 @@ namespace OpenSim.Region.Framework.Scenes
1485 1485
1486 return ret; 1486 return ret;
1487 } 1487 }
1488 1488
1489 public Dictionary<UUID, string> GetScriptStates() 1489 public Dictionary<UUID, string> GetScriptStates()
1490 { 1490 {
1491 return GetScriptStates(false); 1491 return GetScriptStates(false);
@@ -1493,13 +1493,13 @@ namespace OpenSim.Region.Framework.Scenes
1493 1493
1494 public Dictionary<UUID, string> GetScriptStates(bool oldIDs) 1494 public Dictionary<UUID, string> GetScriptStates(bool oldIDs)
1495 { 1495 {
1496 Dictionary<UUID, string> ret = new Dictionary<UUID, string>(); 1496 Dictionary<UUID, string> ret = new Dictionary<UUID, string>();
1497 1497
1498 if (m_part.ParentGroup.Scene == null) // Group not in a scene 1498 if (m_part.ParentGroup.Scene == null) // Group not in a scene
1499 return ret; 1499 return ret;
1500 1500
1501 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 1501 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
1502 1502
1503 if (engines.Length == 0) // No engine at all 1503 if (engines.Length == 0) // No engine at all
1504 return ret; 1504 return ret;
1505 1505
@@ -1535,7 +1535,7 @@ namespace OpenSim.Region.Framework.Scenes
1535 } 1535 }
1536 return ret; 1536 return ret;
1537 } 1537 }
1538 1538
1539 public void ResumeScripts() 1539 public void ResumeScripts()
1540 { 1540 {
1541 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 1541 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();