diff options
author | Justin Clark-Casey (justincc) | 2012-03-17 04:02:23 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-17 04:02:23 +0000 |
commit | 4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa (patch) | |
tree | 35dcefabd3b77d0a7bf03a4be5aee6669cedd684 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Clean up "save iar" help (diff) | |
download | opensim-SC-4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa.zip opensim-SC-4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa.tar.gz opensim-SC-4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa.tar.bz2 opensim-SC-4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa.tar.xz |
Add osGetInventoryDesc() as per http://opensimulator.org/mantis/view.php?id=5927
This allows one to get description data for a given prim inventory item.
Thanks MarcelEdward and GuduleLapointe!
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-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 3dbc31a..2ecd890 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2957,5 +2957,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2957 | 2957 | ||
2958 | return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); | 2958 | return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); |
2959 | } | 2959 | } |
2960 | |||
2961 | /// <summary> | ||
2962 | /// Get the description from an inventory item | ||
2963 | /// </summary> | ||
2964 | /// <param name="inventoryName"></param> | ||
2965 | /// <returns>Item description</returns> | ||
2966 | public LSL_String osGetInventoryDesc(string item) | ||
2967 | { | ||
2968 | m_host.AddScriptLPS(1); | ||
2969 | |||
2970 | lock (m_host.TaskInventory) | ||
2971 | { | ||
2972 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | ||
2973 | { | ||
2974 | if (inv.Value.Name == item) | ||
2975 | { | ||
2976 | return inv.Value.Description.ToString(); | ||
2977 | } | ||
2978 | } | ||
2979 | } | ||
2980 | |||
2981 | return String.Empty; | ||
2982 | } | ||
2960 | } | 2983 | } |
2961 | } \ No newline at end of file | 2984 | } \ No newline at end of file |