add osGetNPCList()
parent
b59ce7c968
commit
e53f439981
|
@ -3835,6 +3835,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return result;
|
||||
}
|
||||
|
||||
public LSL_List osGetNPCList()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.None, "osGetNPCList");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
LSL_List result = new LSL_List();
|
||||
World.ForEachRootScenePresence(delegate (ScenePresence avatar)
|
||||
{
|
||||
if (avatar != null && avatar.IsNPC)
|
||||
{
|
||||
result.Add(new LSL_String(avatar.UUID.ToString()));
|
||||
result.Add(new LSL_Vector(avatar.AbsolutePosition));
|
||||
result.Add(new LSL_String(avatar.Name));
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a unix time to a llGetTimestamp() like string
|
||||
/// </summary>
|
||||
|
|
|
@ -395,6 +395,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb);
|
||||
|
||||
LSL_List osGetAvatarList();
|
||||
LSL_List osGetNPCList();
|
||||
|
||||
LSL_String osUnixTimeToTimestamp(long time);
|
||||
|
||||
|
|
|
@ -1041,6 +1041,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
return m_OSSL_Functions.osGetAvatarList();
|
||||
}
|
||||
|
||||
public LSL_List osGetNPCList()
|
||||
{
|
||||
return m_OSSL_Functions.osGetNPCList();
|
||||
}
|
||||
|
||||
public LSL_String osUnixTimeToTimestamp(long time)
|
||||
{
|
||||
return m_OSSL_Functions.osUnixTimeToTimestamp(time);
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
; Allow_osGetInventoryDesc = true ; no level check
|
||||
; Allow_osGetLinkNumber = true ; no level check
|
||||
; Allow_osGetMapTexture = true ; no level check
|
||||
Allow_osGetNPCList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
||||
; Allow_osGetRegionSize = true ; no level check
|
||||
Allow_osGetRezzingObject = true
|
||||
; Allow_osGetSunParam = true ; no level check
|
||||
|
|
Loading…
Reference in New Issue