diff options
3 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 6ee83ae..7494b88 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3563,7 +3563,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3563 | /// </summary> | 3563 | /// </summary> |
3564 | /// <param name="regionName"></param> | 3564 | /// <param name="regionName"></param> |
3565 | /// <returns></returns> | 3565 | /// <returns></returns> |
3566 | public LSL_Key osGetRegionMapTexture(string regionName) | 3566 | public LSL_Key osGetRegionMapTexture(string regionNameOrID) |
3567 | { | 3567 | { |
3568 | CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); | 3568 | CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); |
3569 | 3569 | ||
@@ -3571,11 +3571,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3571 | UUID key = UUID.Zero; | 3571 | UUID key = UUID.Zero; |
3572 | GridRegion region; | 3572 | GridRegion region; |
3573 | 3573 | ||
3574 | if(string.IsNullOrWhiteSpace(regionNameOrID)) | ||
3575 | { | ||
3576 | return scene.RegionInfo.RegionSettings.TerrainImageID.ToString(); | ||
3577 | } | ||
3578 | |||
3574 | //If string is a key, use it. Otherwise, try to locate region by name. | 3579 | //If string is a key, use it. Otherwise, try to locate region by name. |
3575 | if (UUID.TryParse(regionName, out key)) | 3580 | if (UUID.TryParse(regionNameOrID, out key)) |
3576 | region = scene.GridService.GetRegionByUUID(UUID.Zero, key); | 3581 | region = scene.GridService.GetRegionByUUID(UUID.Zero, key); |
3577 | else | 3582 | else |
3578 | region = scene.GridService.GetRegionByName(UUID.Zero, regionName); | 3583 | region = scene.GridService.GetRegionByName(UUID.Zero, regionNameOrID); |
3579 | 3584 | ||
3580 | // If region was found, return the regions map texture key. | 3585 | // If region was found, return the regions map texture key. |
3581 | if (region != null) | 3586 | if (region != null) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index c65b785..1bd6e08 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -375,7 +375,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
375 | 375 | ||
376 | key osGetGender(LSL_Key rawAvatarId); | 376 | key osGetGender(LSL_Key rawAvatarId); |
377 | key osGetMapTexture(); | 377 | key osGetMapTexture(); |
378 | key osGetRegionMapTexture(string regionName); | 378 | key osGetRegionMapTexture(string regionNameOrID); |
379 | LSL_List osGetRegionStats(); | 379 | LSL_List osGetRegionStats(); |
380 | vector osGetRegionSize(); | 380 | vector osGetRegionSize(); |
381 | 381 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 12c63b3..549047c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -945,9 +945,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
945 | return m_OSSL_Functions.osGetMapTexture(); | 945 | return m_OSSL_Functions.osGetMapTexture(); |
946 | } | 946 | } |
947 | 947 | ||
948 | public key osGetRegionMapTexture(string regionName) | 948 | public key osGetRegionMapTexture(string regionNameOrID) |
949 | { | 949 | { |
950 | return m_OSSL_Functions.osGetRegionMapTexture(regionName); | 950 | return m_OSSL_Functions.osGetRegionMapTexture(regionNameOrID); |
951 | } | 951 | } |
952 | 952 | ||
953 | public LSL_List osGetRegionStats() | 953 | public LSL_List osGetRegionStats() |