aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs55
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs10
3 files changed, 68 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 a5dcba4..339166b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3049,5 +3049,60 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3049 3049
3050 return ScriptBaseClass.TRUE; 3050 return ScriptBaseClass.TRUE;
3051 } 3051 }
3052
3053 /// <summary>
3054 /// Sets terrain estate texture
3055 /// </summary>
3056 /// <param name="level"></param>
3057 /// <param name="texture"></param>
3058 /// <returns></returns>
3059 public void osSetTerrainTexture(int level, LSL_Key texture)
3060 {
3061 CheckThreatLevel(ThreatLevel.High, "osSetTerrainTexture");
3062
3063 m_host.AddScriptLPS(1);
3064 //Check to make sure that the script's owner is the estate manager/master
3065 //World.Permissions.GenericEstatePermission(
3066 if (World.Permissions.IsGod(m_host.OwnerID))
3067 {
3068 if (level < 0 || level > 3)
3069 return;
3070
3071 UUID textureID = new UUID();
3072 if (!UUID.TryParse(texture, out textureID))
3073 return;
3074
3075 // estate module is required
3076 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
3077 if (estate != null)
3078 estate.setEstateTerrainBaseTexture(level, textureID);
3079 }
3080 }
3081
3082 /// <summary>
3083 /// Sets terrain heights of estate
3084 /// </summary>
3085 /// <param name="corner"></param>
3086 /// <param name="low"></param>
3087 /// <param name="high"></param>
3088 /// <returns></returns>
3089 public void osSetTerrainTextureHeight(int corner, double low, double high)
3090 {
3091 CheckThreatLevel(ThreatLevel.High, "osSetTerrainTextureHeight");
3092
3093 m_host.AddScriptLPS(1);
3094 //Check to make sure that the script's owner is the estate manager/master
3095 //World.Permissions.GenericEstatePermission(
3096 if (World.Permissions.IsGod(m_host.OwnerID))
3097 {
3098 if (corner < 0 || corner > 3)
3099 return;
3100
3101 // estate module is required
3102 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
3103 if (estate != null)
3104 estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high);
3105 }
3106 }
3052 } 3107 }
3053} \ No newline at end of file 3108} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 30bd3ef..545bbee 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -234,5 +234,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
234 234
235 LSL_Integer osInviteToGroup(LSL_Key agentId); 235 LSL_Integer osInviteToGroup(LSL_Key agentId);
236 LSL_Integer osEjectFromGroup(LSL_Key agentId); 236 LSL_Integer osEjectFromGroup(LSL_Key agentId);
237
238 void osSetTerrainTexture(int level, LSL_Key texture);
239 void osSetTerrainTextureHeight(int corner, double low, double high);
237 } 240 }
238} 241}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 680cefb4..b94b9bf 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -878,5 +878,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
878 { 878 {
879 return m_OSSL_Functions.osEjectFromGroup(agentId); 879 return m_OSSL_Functions.osEjectFromGroup(agentId);
880 } 880 }
881
882 public void osSetTerrainTexture(int level, LSL_Key texture)
883 {
884 m_OSSL_Functions.osSetTerrainTexture(level, texture);
885 }
886
887 public void osSetTerrainTextureHeight(int corner, double low, double high)
888 {
889 m_OSSL_Functions.osSetTerrainTextureHeight(corner, low, high);
890 }
881 } 891 }
882} 892}