aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-17 04:02:23 +0000
committerJustin Clark-Casey (justincc)2012-03-17 04:02:23 +0000
commit4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa (patch)
tree35dcefabd3b77d0a7bf03a4be5aee6669cedd684 /OpenSim/Region/ScriptEngine/Shared/Api
parentClean up "save iar" help (diff)
downloadopensim-SC_OLD-4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa.zip
opensim-SC_OLD-4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa.tar.gz
opensim-SC_OLD-4a57112f19c0e4eb3545fdc0cbbbd68ce46c6eaa.tar.bz2
opensim-SC_OLD-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')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs23
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
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}