mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Mantis5502 implementation of some of the new constants
Signed-off-by: Melanie <melanie@t-data.com>
This commit is contained in:
@@ -1081,10 +1081,59 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the count of scripts in this parts inventory.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int ScriptCount()
|
||||
{
|
||||
int count = 0;
|
||||
lock (m_items)
|
||||
{
|
||||
foreach (TaskInventoryItem item in m_items.Values)
|
||||
{
|
||||
if (item.InvType == (int)InventoryType.LSL)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns the count of running scripts in this parts inventory.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int RunningScriptCount()
|
||||
{
|
||||
IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
|
||||
if (engines.Length == 0)
|
||||
return 0;
|
||||
|
||||
int count = 0;
|
||||
List<TaskInventoryItem> scripts = GetInventoryScripts();
|
||||
|
||||
foreach (TaskInventoryItem item in scripts)
|
||||
{
|
||||
foreach (IScriptModule engine in engines)
|
||||
{
|
||||
if (engine != null)
|
||||
{
|
||||
if (engine.GetScriptState(item.ItemID))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public List<UUID> GetInventoryList()
|
||||
{
|
||||
List<UUID> ret = new List<UUID>();
|
||||
|
||||
Reference in New Issue
Block a user