aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs31
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
4 files changed, 40 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 71e8ca9..7efdc62 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6307,6 +6307,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6307 { 6307 {
6308 return World.RegionInfo.ObjectCapacity.ToString(); 6308 return World.RegionInfo.ObjectCapacity.ToString();
6309 } 6309 }
6310 else if (name == "region_object_bonus")
6311 {
6312 return World.RegionInfo.RegionSettings.ObjectBonus.ToString();
6313 }
6310 else 6314 else
6311 { 6315 {
6312 return ""; 6316 return "";
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index b101cf9..9742119 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3001,7 +3001,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3001 3001
3002 public void osNpcSetProfileAbout(LSL_Key npc, string about) 3002 public void osNpcSetProfileAbout(LSL_Key npc, string about)
3003 { 3003 {
3004 CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); 3004 CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout");
3005 m_host.AddScriptLPS(1); 3005 m_host.AddScriptLPS(1);
3006 3006
3007 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3007 INPCModule module = World.RequestModuleInterface<INPCModule>();
@@ -3018,6 +3018,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3018 } 3018 }
3019 } 3019 }
3020 3020
3021 public void osNpcSetProfileImage(LSL_Key npc, string image)
3022 {
3023 CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage");
3024 m_host.AddScriptLPS(1);
3025
3026 INPCModule module = World.RequestModuleInterface<INPCModule>();
3027 if (module != null)
3028 {
3029 UUID npcId = new UUID(npc.m_string);
3030
3031 if (!module.CheckPermissions(npcId, m_host.OwnerID))
3032 return;
3033
3034 UUID ImageID = new UUID();
3035
3036 ImageID = ScriptUtils.GetAssetIdFromItemName(m_host, image, (int)AssetType.Texture);
3037
3038 if (ImageID == null || ImageID == UUID.Zero)
3039 {
3040 if (!UUID.TryParse(image, out ImageID))
3041 return;
3042 }
3043
3044 ScenePresence sp = World.GetScenePresence(npcId);
3045 if (sp != null)
3046 ((INPC)(sp.ControllingClient)).profileImage = ImageID;
3047 }
3048 }
3049
3021 public void osNpcSay(LSL_Key npc, string message) 3050 public void osNpcSay(LSL_Key npc, string message)
3022 { 3051 {
3023 osNpcSay(npc, 0, message); 3052 osNpcSay(npc, 0, message);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 87b0967..cf3e6df 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -344,6 +344,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
344 void osNpcSetRot(LSL_Key npc, rotation rot); 344 void osNpcSetRot(LSL_Key npc, rotation rot);
345 void osNpcStopMoveToTarget(LSL_Key npc); 345 void osNpcStopMoveToTarget(LSL_Key npc);
346 void osNpcSetProfileAbout(LSL_Key npc, string about); 346 void osNpcSetProfileAbout(LSL_Key npc, string about);
347 void osNpcSetProfileImage(LSL_Key npc, string image);
347 void osNpcSay(key npc, string message); 348 void osNpcSay(key npc, string message);
348 void osNpcSay(key npc, int channel, string message); 349 void osNpcSay(key npc, int channel, string message);
349 void osNpcShout(key npc, int channel, string message); 350 void osNpcShout(key npc, int channel, string message);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 5bc998e..2e8a76c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -642,6 +642,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
642 m_OSSL_Functions.osNpcSetProfileAbout(npc, about); 642 m_OSSL_Functions.osNpcSetProfileAbout(npc, about);
643 } 643 }
644 644
645 public void osNpcSetProfileImage(LSL_Key npc, string image)
646 {
647 m_OSSL_Functions.osNpcSetProfileImage(npc, image);
648 }
649
645 public void osNpcSay(key npc, string message) 650 public void osNpcSay(key npc, string message)
646 { 651 {
647 m_OSSL_Functions.osNpcSay(npc, message); 652 m_OSSL_Functions.osNpcSay(npc, message);