From d89a089ca266311568febc367f41f4217b7580d1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 22 Feb 2019 22:28:47 +0000 Subject: remove redundant osInventoryDescription() and improve osInventoryDesc() to do the same --- .../Shared/Api/Implementation/OSSL_Api.cs | 25 +--------------------- .../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 4 +--- .../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 9 ++------ 3 files changed, 4 insertions(+), 34 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7674628..dabd399 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -3890,29 +3890,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } /// - /// Get the description from an inventory item - /// - /// - /// Item description - public LSL_String osGetInventoryDesc(string item) - { - CheckThreatLevel(); - - lock (m_host.TaskInventory) - { - foreach (KeyValuePair inv in m_host.TaskInventory) - { - if (inv.Value.Name == item) - { - return inv.Value.Description.ToString(); - } - } - } - - return String.Empty; - } - - /// /// Invite user to the group this object is set to /// /// @@ -5439,7 +5416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return item.Name; } - public LSL_String osGetInventoryDescription(LSL_String itemNameorid) + public LSL_String osGetInventoryDesc(LSL_String itemNameorid) { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 8333af8..49b3f74 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -401,8 +401,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_String osUnixTimeToTimestamp(LSL_Integer time); - LSL_String osGetInventoryDesc(string item); - LSL_Integer osInviteToGroup(LSL_Key agentId); LSL_Integer osEjectFromGroup(LSL_Key agentId); @@ -549,7 +547,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin); LSL_Key osGetInventoryLastOwner(LSL_String itemNameOrId); LSL_String osGetInventoryName(LSL_Key itemId); - LSL_String osGetInventoryDescription(LSL_String itemNameOrId); + LSL_String osGetInventoryDesc(LSL_String itemNameOrId); LSL_Key osGetLastChangedEventKey(); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index f0fb745..fb491e4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -1060,11 +1060,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osUnixTimeToTimestamp(time); } - public LSL_String osGetInventoryDesc(string item) - { - return m_OSSL_Functions.osGetInventoryDesc(item); - } - public LSL_Integer osInviteToGroup(LSL_Key agentId) { return m_OSSL_Functions.osInviteToGroup(agentId); @@ -1377,9 +1372,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osGetInventoryName(itemId); } - public LSL_String osGetInventoryDescription(LSL_String itemNameOrId) + public LSL_String osGetInventoryDesc(LSL_String itemNameOrId) { - return m_OSSL_Functions.osGetInventoryDescription(itemNameOrId); + return m_OSSL_Functions.osGetInventoryDesc(itemNameOrId); } public LSL_Key osGetLastChangedEventKey() -- cgit v1.1