aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorMelanie2012-04-11 23:35:27 +0100
committerMelanie2012-04-11 23:35:27 +0100
commit4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753 (patch)
tree28253aa39e6bf11e8f814d6818f727e5f27eb036 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentMerge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff)
parentHGFriendsModule: Type casts to fix compile error (diff)
downloadopensim-SC_OLD-4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753.zip
opensim-SC_OLD-4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753.tar.gz
opensim-SC_OLD-4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753.tar.bz2
opensim-SC_OLD-4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Interfaces/IEstateModule.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs55
1 files changed, 55 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 0dc2aa2..2899774 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3095,5 +3095,60 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3095 3095
3096 return ScriptBaseClass.TRUE; 3096 return ScriptBaseClass.TRUE;
3097 } 3097 }
3098
3099 /// <summary>
3100 /// Sets terrain estate texture
3101 /// </summary>
3102 /// <param name="level"></param>
3103 /// <param name="texture"></param>
3104 /// <returns></returns>
3105 public void osSetTerrainTexture(int level, LSL_Key texture)
3106 {
3107 CheckThreatLevel(ThreatLevel.High, "osSetTerrainTexture");
3108
3109 m_host.AddScriptLPS(1);
3110 //Check to make sure that the script's owner is the estate manager/master
3111 //World.Permissions.GenericEstatePermission(
3112 if (World.Permissions.IsGod(m_host.OwnerID))
3113 {
3114 if (level < 0 || level > 3)
3115 return;
3116
3117 UUID textureID = new UUID();
3118 if (!UUID.TryParse(texture, out textureID))
3119 return;
3120
3121 // estate module is required
3122 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
3123 if (estate != null)
3124 estate.setEstateTerrainBaseTexture(level, textureID);
3125 }
3126 }
3127
3128 /// <summary>
3129 /// Sets terrain heights of estate
3130 /// </summary>
3131 /// <param name="corner"></param>
3132 /// <param name="low"></param>
3133 /// <param name="high"></param>
3134 /// <returns></returns>
3135 public void osSetTerrainTextureHeight(int corner, double low, double high)
3136 {
3137 CheckThreatLevel(ThreatLevel.High, "osSetTerrainTextureHeight");
3138
3139 m_host.AddScriptLPS(1);
3140 //Check to make sure that the script's owner is the estate manager/master
3141 //World.Permissions.GenericEstatePermission(
3142 if (World.Permissions.IsGod(m_host.OwnerID))
3143 {
3144 if (corner < 0 || corner > 3)
3145 return;
3146
3147 // estate module is required
3148 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
3149 if (estate != null)
3150 estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high);
3151 }
3152 }
3098 } 3153 }
3099} 3154}