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 | 23 |
1 files changed, 23 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 8dfc7d2..d140c26 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3003,5 +3003,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3003 | 3003 | ||
3004 | return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); | 3004 | return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); |
3005 | } | 3005 | } |
3006 | |||
3007 | /// <summary> | ||
3008 | /// Get the description from an inventory item | ||
3009 | /// </summary> | ||
3010 | /// <param name="inventoryName"></param> | ||
3011 | /// <returns>Item description</returns> | ||
3012 | public LSL_String osGetInventoryDesc(string item) | ||
3013 | { | ||
3014 | m_host.AddScriptLPS(1); | ||
3015 | |||
3016 | lock (m_host.TaskInventory) | ||
3017 | { | ||
3018 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | ||
3019 | { | ||
3020 | if (inv.Value.Name == item) | ||
3021 | { | ||
3022 | return inv.Value.Description.ToString(); | ||
3023 | } | ||
3024 | } | ||
3025 | } | ||
3026 | |||
3027 | return String.Empty; | ||
3028 | } | ||
3006 | } | 3029 | } |
3007 | } | 3030 | } |