From 78c0028179923710949fea349baad2e6bebc49bd Mon Sep 17 00:00:00 2001 From: Talun Date: Mon, 9 Apr 2012 19:58:07 +0100 Subject: Mantis5502 implementation of some of the new constants Signed-off-by: Melanie --- OpenSim/Region/Framework/Interfaces/IEntityInventory.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region/Framework/Interfaces/IEntityInventory.cs') diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index 1334905..f5dda34 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs @@ -226,6 +226,16 @@ namespace OpenSim.Region.Framework.Interfaces bool ContainsScripts(); /// + /// Returns the count of scripts contained + /// + int ScriptCount(); + + /// + /// Returns the count of running scripts contained + /// + int RunningScriptCount(); + + /// /// Get the uuids of all items in this inventory /// /// -- cgit v1.1 From 08e509978d81cb3451c205ed59648e3f5da91344 Mon Sep 17 00:00:00 2001 From: Talun Date: Tue, 10 Apr 2012 21:25:05 +0100 Subject: Mantis 55025 Implement script time. Signed-off-by: nebadon --- OpenSim/Region/Framework/Interfaces/IEntityInventory.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Interfaces/IEntityInventory.cs') diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index f5dda34..30ed7d1 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs @@ -172,7 +172,17 @@ namespace OpenSim.Region.Framework.Interfaces /// If no inventory item has that name then an empty list is returned. /// List GetInventoryItems(string name); - + + /// + /// Get inventory items by type. + /// + /// + /// + /// A list of inventory items of that type. + /// If no inventory items of that type then an empty list is returned. + /// + List GetInventoryItems(InventoryType type); + /// /// Get the scene object referenced by an inventory item. /// -- cgit v1.1 From ff53add54dbc666e585b928ba51b4babb7441611 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 26 May 2012 00:36:01 +0100 Subject: refactor: replace LSL_Api.InventoryKey(string) largely with SceneObjectPartInventory.GetInventoryItem(string) Also gets llStopAnimation() to call KeyOrName rather than duplicating logic. --- OpenSim/Region/Framework/Interfaces/IEntityInventory.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'OpenSim/Region/Framework/Interfaces/IEntityInventory.cs') diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index 30ed7d1..4370fcc 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs @@ -164,6 +164,19 @@ namespace OpenSim.Region.Framework.Interfaces List GetInventoryItems(); /// + /// Gets an inventory item by name + /// + /// + /// This method returns the first inventory item that matches the given name. In SL this is all you need + /// since each item in a prim inventory must have a unique name. + /// + /// + /// + /// The inventory item. Null if no such item was found. + /// + TaskInventoryItem GetInventoryItem(string name); + + /// /// Get inventory items by name. /// /// -- cgit v1.1 From 0fa303b1cf244b3066395413e640318b2122c19f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 20 Jun 2012 00:10:19 +0100 Subject: Log how many scripts are candidates for starting and how many are actually started. Adds DebugLevel infrastructure to XEngine though currently commented out and unused. --- .../Region/Framework/Interfaces/IEntityInventory.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Interfaces/IEntityInventory.cs') diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index 4370fcc..1c9bdce 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs @@ -81,7 +81,12 @@ namespace OpenSim.Region.Framework.Interfaces /// /// Start all the scripts contained in this entity's inventory /// - void CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource); + /// + /// + /// + /// + /// Number of scripts started. + int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource); ArrayList GetScriptErrors(UUID itemID); void ResumeScripts(); @@ -102,7 +107,11 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - void CreateScriptInstance( + /// + /// true if the script instance was valid for starting, false otherwise. This does not guarantee + /// that the script was actually started, just that the script was valid (i.e. its asset data could be found, etc.) + /// + bool CreateScriptInstance( TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource); /// @@ -113,7 +122,11 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource); + /// + /// true if the script instance was valid for starting, false otherwise. This does not guarantee + /// that the script was actually started, just that the script was valid (i.e. its asset data could be found, etc.) + /// + bool CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource); /// /// Stop a script which is in this prim's inventory. -- cgit v1.1 From f3134b5cf688af9b824880e0221072b24d22f33e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 10 Jul 2012 22:41:11 +0100 Subject: When an attachment is detached to inv or derezzed, stop the scripts, update the known item with script state still in the script engine and then remove the scripts. This is to fix a regression starting from 5301648 where attachments had to start being deleted before persistence in order to avoid race conditions with hud update threads. --- OpenSim/Region/Framework/Interfaces/IEntityInventory.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Interfaces/IEntityInventory.cs') diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index 1c9bdce..8d62847 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs @@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Interfaces void ResumeScripts(); /// - /// Stop all the scripts in this entity. + /// Stop and remove all the scripts in this entity from the scene. /// /// /// Should be true if these scripts are being removed because the scene @@ -101,6 +101,11 @@ namespace OpenSim.Region.Framework.Interfaces void RemoveScriptInstances(bool sceneObjectBeingDeleted); /// + /// Stop all the scripts in this entity. + /// + void StopScriptInstances(); + + /// /// Start a script which is in this entity's inventory. /// /// @@ -129,7 +134,7 @@ namespace OpenSim.Region.Framework.Interfaces bool CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource); /// - /// Stop a script which is in this prim's inventory. + /// Stop and remove a script which is in this prim's inventory from the scene. /// /// /// @@ -139,6 +144,12 @@ namespace OpenSim.Region.Framework.Interfaces void RemoveScriptInstance(UUID itemId, bool sceneObjectBeingDeleted); /// + /// Stop a script which is in this prim's inventory. + /// + /// + void StopScriptInstance(UUID itemId); + + /// /// Add an item to this entity's inventory. If an item with the same name already exists, then an alternative /// name is chosen. /// -- cgit v1.1