Add some discovery code, laying groundwork for region-crossing scripts

No user functionality yet
0.6.1-post-fixes
Melanie Thielker 2008-11-08 14:35:52 +00:00
parent 69afefa788
commit e93828fe00
3 changed files with 29 additions and 3 deletions

View File

@ -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();
}
}
}

View File

@ -34,5 +34,8 @@ namespace OpenSim.Region.Interfaces
public interface IScriptModule
{
string ScriptEngineName { get; }
string GetAssemblyName(UUID itemID);
string GetXMLState(UUID itemID);
}
}

View File

@ -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);
}
}