Mantis 55025 Implement script time.

Signed-off-by: nebadon <michael@osgrid.org>
This commit is contained in:
Talun
2012-04-10 21:25:05 +01:00
committed by nebadon
parent 30d8506bc2
commit 08e509978d
7 changed files with 136 additions and 47 deletions

View File

@@ -222,7 +222,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
public void CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource)
{
List<TaskInventoryItem> scripts = GetInventoryScripts();
List<TaskInventoryItem> scripts = GetInventoryItems(InventoryType.LSL);
foreach (TaskInventoryItem item in scripts)
CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
}
@@ -255,7 +255,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </param>
public void RemoveScriptInstances(bool sceneObjectBeingDeleted)
{
List<TaskInventoryItem> scripts = GetInventoryScripts();
List<TaskInventoryItem> scripts = GetInventoryItems(InventoryType.LSL);
foreach (TaskInventoryItem item in scripts)
RemoveScriptInstance(item.ItemID, sceneObjectBeingDeleted);
}
@@ -1116,7 +1116,7 @@ namespace OpenSim.Region.Framework.Scenes
return 0;
int count = 0;
List<TaskInventoryItem> scripts = GetInventoryScripts();
List<TaskInventoryItem> scripts = GetInventoryItems(InventoryType.LSL);
foreach (TaskInventoryItem item in scripts)
{
@@ -1157,14 +1157,14 @@ namespace OpenSim.Region.Framework.Scenes
return ret;
}
public List<TaskInventoryItem> GetInventoryScripts()
public List<TaskInventoryItem> GetInventoryItems(InventoryType type)
{
List<TaskInventoryItem> ret = new List<TaskInventoryItem>();
lock (m_items)
{
foreach (TaskInventoryItem item in m_items.Values)
if (item.InvType == (int)InventoryType.LSL)
if (item.InvType == (int)type)
ret.Add(item);
}
@@ -1183,7 +1183,7 @@ namespace OpenSim.Region.Framework.Scenes
if (engines.Length == 0) // No engine at all
return ret;
List<TaskInventoryItem> scripts = GetInventoryScripts();
List<TaskInventoryItem> scripts = GetInventoryItems(InventoryType.LSL);
foreach (TaskInventoryItem item in scripts)
{
@@ -1211,7 +1211,7 @@ namespace OpenSim.Region.Framework.Scenes
if (engines.Length == 0)
return;
List<TaskInventoryItem> scripts = GetInventoryScripts();
List<TaskInventoryItem> scripts = GetInventoryItems(InventoryType.LSL);
foreach (TaskInventoryItem item in scripts)
{