diff options
author | Melanie | 2012-04-11 23:35:27 +0100 |
---|---|---|
committer | Melanie | 2012-04-11 23:35:27 +0100 |
commit | 4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753 (patch) | |
tree | 28253aa39e6bf11e8f814d6818f727e5f27eb036 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff) | |
parent | HGFriendsModule: Type casts to fix compile error (diff) | |
download | opensim-SC-4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753.zip opensim-SC-4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753.tar.gz opensim-SC-4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753.tar.bz2 opensim-SC-4a67e8b98fd6ec2b2a7e390256e0c3ef7aa21753.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Interfaces/IEstateModule.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
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 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 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 444a681..2fcc443 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 | } |