Add some discovery code, laying groundwork for region-crossing scripts
No user functionality yet0.6.1-post-fixes
parent
69afefa788
commit
e93828fe00
|
@ -32,6 +32,7 @@ using OpenMetaverse;
|
|||
using log4net;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Region.Interfaces;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Scenes.Scripting;
|
||||
|
||||
|
@ -763,5 +764,30 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
string[] GetScriptAssemblies()
|
||||
{
|
||||
IScriptModule[] engines = m_parentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
|
||||
|
||||
List<string> ret = new List<string>();
|
||||
|
||||
foreach (TaskInventoryItem item in m_taskInventory.Values)
|
||||
{
|
||||
if (item.InvType == 10)
|
||||
{
|
||||
foreach (IScriptModule e in engines)
|
||||
{
|
||||
string n = e.GetAssemblyName(item.ItemID);
|
||||
if (n != "")
|
||||
{
|
||||
if (!ret.Contains(n))
|
||||
ret.Add(n);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,5 +34,8 @@ namespace OpenSim.Region.Interfaces
|
|||
public interface IScriptModule
|
||||
{
|
||||
string ScriptEngineName { get; }
|
||||
|
||||
string GetAssemblyName(UUID itemID);
|
||||
string GetXMLState(UUID itemID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,8 +72,5 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
|
|||
string ScriptEngineName { get; }
|
||||
ILog Log { get; }
|
||||
IScriptApi GetApi(UUID itemID, string name);
|
||||
|
||||
string GetAssemblyName(UUID itemID);
|
||||
string GetXMLState(UUID itemID);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue