diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 55 |
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 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 |