aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs15
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEstateModule.cs3
-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
5 files changed, 84 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index fc217b0..124f01c 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -157,12 +157,18 @@ namespace OpenSim.Region.CoreModules.World.Estate
157 sendRegionInfoPacketToAll(); 157 sendRegionInfoPacketToAll();
158 } 158 }
159 159
160 public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture) 160 public void setEstateTerrainBaseTexture(int level, UUID texture)
161 {
162 setEstateTerrainBaseTexture(null, level, texture);
163 sendRegionHandshakeToAll();
164 }
165
166 public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int level, UUID texture)
161 { 167 {
162 if (texture == UUID.Zero) 168 if (texture == UUID.Zero)
163 return; 169 return;
164 170
165 switch (corner) 171 switch (level)
166 { 172 {
167 case 0: 173 case 0:
168 Scene.RegionInfo.RegionSettings.TerrainTexture1 = texture; 174 Scene.RegionInfo.RegionSettings.TerrainTexture1 = texture;
@@ -182,6 +188,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
182 sendRegionInfoPacketToAll(); 188 sendRegionInfoPacketToAll();
183 } 189 }
184 190
191 public void setEstateTerrainTextureHeights(int corner, float lowValue, float highValue)
192 {
193 setEstateTerrainTextureHeights(null, corner, lowValue, highValue);
194 }
195
185 public void setEstateTerrainTextureHeights(IClientAPI client, int corner, float lowValue, float highValue) 196 public void setEstateTerrainTextureHeights(IClientAPI client, int corner, float lowValue, float highValue)
186 { 197 {
187 switch (corner) 198 switch (corner)
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
index 721f0ee..15cd238 100644
--- a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
@@ -45,5 +45,8 @@ namespace OpenSim.Region.Framework.Interfaces
45 /// Tell all clients about the current state of the region (terrain textures, water height, etc.). 45 /// Tell all clients about the current state of the region (terrain textures, water height, etc.).
46 /// </summary> 46 /// </summary>
47 void sendRegionHandshakeToAll(); 47 void sendRegionHandshakeToAll();
48
49 void setEstateTerrainBaseTexture(int level, UUID texture);
50 void setEstateTerrainTextureHeights(int corner, float lowValue, float highValue);
48 } 51 }
49} 52}
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}