add osGetSearchableObjectList()

master
Christopher 2020-06-19 09:13:47 +02:00
parent 7997f206af
commit 362a49c0ed
1 changed files with 26 additions and 0 deletions

View File

@ -14,6 +14,14 @@ using System.Drawing.Imaging;
using System.Reflection;
using System.Threading;
using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
[assembly: Addin("BasicPathFindingModule", "0.1")]
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
namespace OpenSim.Modules.PathFinding
@ -105,6 +113,8 @@ namespace OpenSim.Modules.PathFinding
m_scriptModule.RegisterScriptInvocation(this, "osSetPositionData");
m_scriptModule.RegisterScriptInvocation(this, "osGeneratePath");
m_scriptModule.RegisterScriptInvocation(this, "osGetObjectsList");
m_scriptModule.RegisterScriptInvocation(this, "osGenerateDebugImage");
m_scriptModule.RegisterConstant("PATH_ENV_SUCCESSFUL", 19850);
@ -294,6 +304,22 @@ namespace OpenSim.Modules.PathFinding
return requestKey.ToString();
}
[ScriptInvocation]
public LSL_List osGetSearchableObjectList(UUID hostID, UUID scriptID, String searchString)
{
LSL_List returnList = new LSL_List();
foreach (SceneObjectGroup thisGroup in m_scene.GetSceneObjectGroups())
{
if(thisGroup.Name == searchString)
returnList.Add(thisGroup.GroupID);
}
return returnList;
}
#endregion
}