aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorUbitUmarov2017-06-26 20:42:49 +0100
committerUbitUmarov2017-06-26 20:42:49 +0100
commite53f4399812224939e4ebec6790a9addb38cca95 (patch)
tree1b0475c53ec34cd1f387baccc50bce206ad1e4a3 /OpenSim/Region/ScriptEngine/Shared/Api
parentalso on the actual source file (diff)
downloadopensim-SC_OLD-e53f4399812224939e4ebec6790a9addb38cca95.zip
opensim-SC_OLD-e53f4399812224939e4ebec6790a9addb38cca95.tar.gz
opensim-SC_OLD-e53f4399812224939e4ebec6790a9addb38cca95.tar.bz2
opensim-SC_OLD-e53f4399812224939e4ebec6790a9addb38cca95.tar.xz
add osGetNPCList()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs19
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
3 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 823a4e5..fa7ee21 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3835,6 +3835,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3835 return result; 3835 return result;
3836 } 3836 }
3837 3837
3838 public LSL_List osGetNPCList()
3839 {
3840 CheckThreatLevel(ThreatLevel.None, "osGetNPCList");
3841 m_host.AddScriptLPS(1);
3842
3843 LSL_List result = new LSL_List();
3844 World.ForEachRootScenePresence(delegate (ScenePresence avatar)
3845 {
3846 if (avatar != null && avatar.IsNPC)
3847 {
3848 result.Add(new LSL_String(avatar.UUID.ToString()));
3849 result.Add(new LSL_Vector(avatar.AbsolutePosition));
3850 result.Add(new LSL_String(avatar.Name));
3851 }
3852 });
3853
3854 return result;
3855 }
3856
3838 /// <summary> 3857 /// <summary>
3839 /// Convert a unix time to a llGetTimestamp() like string 3858 /// Convert a unix time to a llGetTimestamp() like string
3840 /// </summary> 3859 /// </summary>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index f7857da..6e6a0be 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -395,6 +395,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
395 void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb); 395 void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb);
396 396
397 LSL_List osGetAvatarList(); 397 LSL_List osGetAvatarList();
398 LSL_List osGetNPCList();
398 399
399 LSL_String osUnixTimeToTimestamp(long time); 400 LSL_String osUnixTimeToTimestamp(long time);
400 401
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index d6af32b..43113b8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -1041,6 +1041,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1041 return m_OSSL_Functions.osGetAvatarList(); 1041 return m_OSSL_Functions.osGetAvatarList();
1042 } 1042 }
1043 1043
1044 public LSL_List osGetNPCList()
1045 {
1046 return m_OSSL_Functions.osGetNPCList();
1047 }
1048
1044 public LSL_String osUnixTimeToTimestamp(long time) 1049 public LSL_String osUnixTimeToTimestamp(long time)
1045 { 1050 {
1046 return m_OSSL_Functions.osUnixTimeToTimestamp(time); 1051 return m_OSSL_Functions.osUnixTimeToTimestamp(time);