diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-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 2c0de93..72c1bf6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3038,5 +3038,60 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3038 | 3038 | ||
3039 | return ScriptBaseClass.TRUE; | 3039 | return ScriptBaseClass.TRUE; |
3040 | } | 3040 | } |
3041 | |||
3042 | /// <summary> | ||
3043 | /// Sets terrain estate texture | ||
3044 | /// </summary> | ||
3045 | /// <param name="level"></param> | ||
3046 | /// <param name="texture"></param> | ||
3047 | /// <returns></returns> | ||
3048 | public void osSetTerrainTexture(int level, LSL_Key texture) | ||
3049 | { | ||
3050 | CheckThreatLevel(ThreatLevel.High, "osSetTerrainTexture"); | ||
3051 | |||
3052 | m_host.AddScriptLPS(1); | ||
3053 | //Check to make sure that the script's owner is the estate manager/master | ||
3054 | //World.Permissions.GenericEstatePermission( | ||
3055 | if (World.Permissions.IsGod(m_host.OwnerID)) | ||
3056 | { | ||
3057 | if (level < 0 || level > 3) | ||
3058 | return; | ||
3059 | |||
3060 | UUID textureID = new UUID(); | ||
3061 | if (!UUID.TryParse(texture, out textureID)) | ||
3062 | return; | ||
3063 | |||
3064 | // estate module is required | ||
3065 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); | ||
3066 | if (estate != null) | ||
3067 | estate.setEstateTerrainBaseTexture(level, textureID); | ||
3068 | } | ||
3069 | } | ||
3070 | |||
3071 | /// <summary> | ||
3072 | /// Sets terrain heights of estate | ||
3073 | /// </summary> | ||
3074 | /// <param name="corner"></param> | ||
3075 | /// <param name="low"></param> | ||
3076 | /// <param name="high"></param> | ||
3077 | /// <returns></returns> | ||
3078 | public void osSetTerrainTextureHeight(int corner, double low, double high) | ||
3079 | { | ||
3080 | CheckThreatLevel(ThreatLevel.High, "osSetTerrainTextureHeight"); | ||
3081 | |||
3082 | m_host.AddScriptLPS(1); | ||
3083 | //Check to make sure that the script's owner is the estate manager/master | ||
3084 | //World.Permissions.GenericEstatePermission( | ||
3085 | if (World.Permissions.IsGod(m_host.OwnerID)) | ||
3086 | { | ||
3087 | if (corner < 0 || corner > 3) | ||
3088 | return; | ||
3089 | |||
3090 | // estate module is required | ||
3091 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); | ||
3092 | if (estate != null) | ||
3093 | estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high); | ||
3094 | } | ||
3095 | } | ||
3041 | } | 3096 | } |
3042 | } \ No newline at end of file | 3097 | } \ No newline at end of file |