diff options
author | Diva Canto | 2012-03-17 10:00:43 -0700 |
---|---|---|
committer | Diva Canto | 2012-03-17 10:00:43 -0700 |
commit | d87a5758fb648b5e314950ac35050fbf5af9e3df (patch) | |
tree | 4cb978de354d265418187d4edb30b54dddf21448 /OpenSim/Region | |
parent | Region access control! Region operators can now specify things like DisallowF... (diff) | |
parent | Add osGetInventoryDesc() as per http://opensimulator.org/mantis/view.php?id=5927 (diff) | |
download | opensim-SC_OLD-d87a5758fb648b5e314950ac35050fbf5af9e3df.zip opensim-SC_OLD-d87a5758fb648b5e314950ac35050fbf5af9e3df.tar.gz opensim-SC_OLD-d87a5758fb648b5e314950ac35050fbf5af9e3df.tar.bz2 opensim-SC_OLD-d87a5758fb648b5e314950ac35050fbf5af9e3df.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
3 files changed, 30 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 |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index a5b906f..8f9efc0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -229,5 +229,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
229 | LSL_List osGetAvatarList(); | 229 | LSL_List osGetAvatarList(); |
230 | 230 | ||
231 | LSL_String osUnixTimeToTimestamp(long time); | 231 | LSL_String osUnixTimeToTimestamp(long time); |
232 | |||
233 | LSL_String osGetInventoryDesc(string item); | ||
232 | } | 234 | } |
233 | } | 235 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index e048da2..09e5992 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -863,5 +863,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
863 | { | 863 | { |
864 | return m_OSSL_Functions.osUnixTimeToTimestamp(time); | 864 | return m_OSSL_Functions.osUnixTimeToTimestamp(time); |
865 | } | 865 | } |
866 | |||
867 | public LSL_String osGetInventoryDesc(string item) | ||
868 | { | ||
869 | return m_OSSL_Functions.osGetInventoryDesc(item); | ||
870 | } | ||
866 | } | 871 | } |
867 | } | 872 | } |