aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs49
1 files changed, 36 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 4700c3b..663aa22 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -57,11 +57,11 @@ namespace OpenSim.Region.Framework.Scenes
57 protected AsyncInventorySender m_asyncInventorySender; 57 protected AsyncInventorySender m_asyncInventorySender;
58 58
59 /// <summary> 59 /// <summary>
60 /// Start all the scripts in the scene which should be started. 60 /// Creates all the scripts in the scene which should be started.
61 /// </summary> 61 /// </summary>
62 public void CreateScriptInstances() 62 public void CreateScriptInstances()
63 { 63 {
64 m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); 64 m_log.Info("[PRIM INVENTORY]: Creating scripts in scene");
65 65
66 EntityBase[] entities = Entities.GetEntities(); 66 EntityBase[] entities = Entities.GetEntities();
67 foreach (EntityBase group in entities) 67 foreach (EntityBase group in entities)
@@ -74,6 +74,26 @@ namespace OpenSim.Region.Framework.Scenes
74 } 74 }
75 } 75 }
76 76
77 /// <summary>
78 /// Lets the script engines start processing scripts.
79 /// </summary>
80 public void StartScripts()
81 {
82 m_log.Info("[PRIM INVENTORY]: Starting scripts in scene");
83
84 IScriptModule[] engines = RequestModuleInterfaces<IScriptModule>();
85 if (engines != null)
86 {
87 foreach (IScriptModule engine in engines)
88 {
89 if (engine != null)
90 {
91 engine.StartProcessing();
92 }
93 }
94 }
95 }
96
77 public void AddUploadedInventoryItem(UUID agentID, InventoryItemBase item) 97 public void AddUploadedInventoryItem(UUID agentID, InventoryItemBase item)
78 { 98 {
79 IMoneyModule money = RequestModuleInterface<IMoneyModule>(); 99 IMoneyModule money = RequestModuleInterface<IMoneyModule>();
@@ -254,7 +274,7 @@ namespace OpenSim.Region.Framework.Scenes
254 if (group.UpdateInventoryItem(item)) 274 if (group.UpdateInventoryItem(item))
255 remoteClient.SendAgentAlertMessage("Script saved", false); 275 remoteClient.SendAgentAlertMessage("Script saved", false);
256 276
257 part.GetProperties(remoteClient); 277 part.SendPropertiesToClient(remoteClient);
258 278
259 // Trigger rerunning of script (use TriggerRezScript event, see RezScript) 279 // Trigger rerunning of script (use TriggerRezScript event, see RezScript)
260 ArrayList errors = new ArrayList(); 280 ArrayList errors = new ArrayList();
@@ -314,6 +334,10 @@ namespace OpenSim.Region.Framework.Scenes
314 public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID, 334 public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
315 UUID itemID, InventoryItemBase itemUpd) 335 UUID itemID, InventoryItemBase itemUpd)
316 { 336 {
337// m_log.DebugFormat(
338// "[USER INVENTORY]: Updating asset for item {0} {1}, transaction ID {2} for {3}",
339// itemID, itemUpd.Name, transactionID, remoteClient.Name);
340
317 // This one will let people set next perms on items in agent 341 // This one will let people set next perms on items in agent
318 // inventory. Rut-Roh. Whatever. Make this secure. Yeah. 342 // inventory. Rut-Roh. Whatever. Make this secure. Yeah.
319 // 343 //
@@ -365,8 +389,7 @@ namespace OpenSim.Region.Framework.Scenes
365 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); 389 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
366 if (agentTransactions != null) 390 if (agentTransactions != null)
367 { 391 {
368 agentTransactions.HandleItemUpdateFromTransaction( 392 agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
369 remoteClient, transactionID, item);
370 } 393 }
371 } 394 }
372 } 395 }
@@ -979,7 +1002,7 @@ namespace OpenSim.Region.Framework.Scenes
979 } 1002 }
980 1003
981 group.RemoveInventoryItem(localID, itemID); 1004 group.RemoveInventoryItem(localID, itemID);
982 part.GetProperties(remoteClient); 1005 part.SendPropertiesToClient(remoteClient);
983 } 1006 }
984 1007
985 private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId) 1008 private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId)
@@ -1252,7 +1275,7 @@ namespace OpenSim.Region.Framework.Scenes
1252 1275
1253 if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) 1276 if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar))
1254 { 1277 {
1255 destPart.GetProperties(avatar.ControllingClient); 1278 destPart.SendPropertiesToClient(avatar.ControllingClient);
1256 } 1279 }
1257 } 1280 }
1258 1281
@@ -1407,7 +1430,7 @@ namespace OpenSim.Region.Framework.Scenes
1407 m_log.InfoFormat( 1430 m_log.InfoFormat(
1408 "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", 1431 "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
1409 item.Name, primLocalID, remoteClient.Name); 1432 item.Name, primLocalID, remoteClient.Name);
1410 part.GetProperties(remoteClient); 1433 part.SendPropertiesToClient(remoteClient);
1411 if (!Permissions.BypassPermissions()) 1434 if (!Permissions.BypassPermissions())
1412 { 1435 {
1413 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) 1436 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
@@ -1502,7 +1525,7 @@ namespace OpenSim.Region.Framework.Scenes
1502 1525
1503 if (part.Inventory.UpdateInventoryItem(itemInfo)) 1526 if (part.Inventory.UpdateInventoryItem(itemInfo))
1504 { 1527 {
1505 part.GetProperties(remoteClient); 1528 part.SendPropertiesToClient(remoteClient);
1506 } 1529 }
1507 } 1530 }
1508 } 1531 }
@@ -1554,7 +1577,7 @@ namespace OpenSim.Region.Framework.Scenes
1554 // m_log.InfoFormat("[PRIMINVENTORY]: " + 1577 // m_log.InfoFormat("[PRIMINVENTORY]: " +
1555 // "Rezzed script {0} into prim local ID {1} for user {2}", 1578 // "Rezzed script {0} into prim local ID {1} for user {2}",
1556 // item.inventoryName, localID, remoteClient.Name); 1579 // item.inventoryName, localID, remoteClient.Name);
1557 part.GetProperties(remoteClient); 1580 part.SendPropertiesToClient(remoteClient);
1558 part.ParentGroup.ResumeScripts(); 1581 part.ParentGroup.ResumeScripts();
1559 } 1582 }
1560 else 1583 else
@@ -1612,7 +1635,7 @@ namespace OpenSim.Region.Framework.Scenes
1612 taskItem.AssetID = asset.FullID; 1635 taskItem.AssetID = asset.FullID;
1613 1636
1614 part.Inventory.AddInventoryItem(taskItem, false); 1637 part.Inventory.AddInventoryItem(taskItem, false);
1615 part.GetProperties(remoteClient); 1638 part.SendPropertiesToClient(remoteClient);
1616 1639
1617 part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); 1640 part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0);
1618 part.ParentGroup.ResumeScripts(); 1641 part.ParentGroup.ResumeScripts();
@@ -1726,7 +1749,7 @@ namespace OpenSim.Region.Framework.Scenes
1726 1749
1727 if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) 1750 if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar))
1728 { 1751 {
1729 destPart.GetProperties(avatar.ControllingClient); 1752 destPart.SendPropertiesToClient(avatar.ControllingClient);
1730 } 1753 }
1731 } 1754 }
1732 1755
@@ -2064,7 +2087,7 @@ namespace OpenSim.Region.Framework.Scenes
2064 SceneObjectPart part = GetSceneObjectPart(localID); 2087 SceneObjectPart part = GetSceneObjectPart(localID);
2065 if (part == null) 2088 if (part == null)
2066 continue; 2089 continue;
2067 part.GetProperties(remoteClient); 2090 part.SendPropertiesToClient(remoteClient);
2068 } 2091 }
2069 } 2092 }
2070 2093